<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The University of Glasgow 2006-2008
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# LANGUAGE CPP, NondecreasingIndentation #-}</span><span>
</span><span id="line-7"></span><span class="hs-pragma">{-# LANGUAGE MultiWayIf #-}</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-comment">-- | Module for constructing @ModIface@ values (interface files),</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- writing them to disk and comparing two versions to see if</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- recompilation is required.</span><span>
</span><span id="line-12"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Iface.Make</span><span>
</span><span id="line-13"></span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Iface.Make.html#mkPartialIface"><span class="hs-identifier">mkPartialIface</span></a></span><span>
</span><span id="line-14"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Make.html#mkFullIface"><span class="hs-identifier">mkFullIface</span></a></span><span>
</span><span id="line-15"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Make.html#mkIfaceTc"><span class="hs-identifier">mkIfaceTc</span></a></span><span>
</span><span id="line-16"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Make.html#mkIfaceExports"><span class="hs-identifier">mkIfaceExports</span></a></span><span>
</span><span id="line-17"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Make.html#coAxiomToIfaceDecl"><span class="hs-identifier">coAxiomToIfaceDecl</span></a></span><span>
</span><span id="line-18"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Make.html#tyThingToIfaceDecl"><span class="hs-identifier">tyThingToIfaceDecl</span></a></span><span> </span><span class="hs-comment">-- Converting things to their Iface equivalents</span><span>
</span><span id="line-19"></span><span>   </span><span class="hs-special">)</span><span>
</span><span id="line-20"></span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html"><span class="hs-identifier">GHC.Iface.Syntax</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Recomp.html"><span class="hs-identifier">GHC.Iface.Recomp</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Iface.Load.html"><span class="hs-identifier">GHC.Iface.Load</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CoreToIface.html"><span class="hs-identifier">GHC.CoreToIface</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Usage.html"><span class="hs-identifier">GHC.HsToCore.Usage</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.HsToCore.Usage.html#mkUsageInfo"><span class="hs-identifier">mkUsageInfo</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Usage.html#mkUsedNames"><span class="hs-identifier">mkUsedNames</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.HsToCore.Usage.html#mkDependencies"><span class="hs-identifier">mkDependencies</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Annotations.html"><span class="hs-identifier">GHC.Types.Annotations</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Class.html"><span class="hs-identifier">GHC.Core.Class</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html"><span class="hs-identifier">GHC.Core.TyCon</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html"><span class="hs-identifier">GHC.Core.Coercion.Axiom</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.ConLike.html"><span class="hs-identifier">GHC.Core.ConLike</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html"><span class="hs-identifier">GHC.Core.DataCon</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Multiplicity.html"><span class="hs-identifier">GHC.Core.Multiplicity</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html"><span class="hs-identifier">GHC.StgToCmm.Types</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.StgToCmm.Types.html#CgInfos"><span class="hs-identifier">CgInfos</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.TcType.html"><span class="hs-identifier">GHC.Tc.Utils.TcType</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.InstEnv.html"><span class="hs-identifier">GHC.Core.InstEnv</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html"><span class="hs-identifier">GHC.Core.FamInstEnv</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Tc.Utils.Monad.html"><span class="hs-identifier">GHC.Tc.Utils.Monad</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Hs.html"><span class="hs-identifier">GHC.Hs</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html"><span class="hs-identifier">GHC.Types.Var.Env</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.html"><span class="hs-identifier">GHC.Types.Name</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html"><span class="hs-identifier">GHC.Types.Avail</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html"><span class="hs-identifier">GHC.Types.Name.Reader</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html"><span class="hs-identifier">GHC.Types.Name.Env</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html"><span class="hs-identifier">GHC.Types.Name.Set</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unit.Module.html"><span class="hs-identifier">GHC.Unit.Module</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#SuccessFlag"><span class="hs-identifier">SuccessFlag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-61"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>  </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html#eqListBy"><span class="hs-identifier">eqListBy</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Maybe.html"><span class="hs-identifier">GHC.Data.Maybe</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.HsToCore.Docs.html"><span class="hs-identifier">GHC.HsToCore.Docs</span></a></span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Function.html#"><span class="hs-identifier">Data.Function</span></a></span><span>
</span><span id="line-67"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#findIndex"><span class="hs-identifier">findIndex</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#mapAccumL"><span class="hs-identifier">mapAccumL</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier">sortBy</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-68"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Ord.html#"><span class="hs-identifier">Data.Ord</span></a></span><span>
</span><span id="line-69"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.IORef.html#"><span class="hs-identifier">Data.IORef</span></a></span><span>
</span><span id="line-70"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Plugins.html"><span class="hs-identifier">GHC.Driver.Plugins</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Plugins.html#LoadedPlugin"><span class="hs-identifier">LoadedPlugin</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-71"></span><span>
</span><span id="line-72"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Completing an interface}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="annot"><a href="GHC.Iface.Make.html#mkPartialIface"><span class="hs-identifier hs-type">mkPartialIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-81"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModDetails"><span class="hs-identifier hs-type">ModDetails</span></a></span><span>
</span><span id="line-82"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span>
</span><span id="line-83"></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#PartialModIface"><span class="hs-identifier hs-type">PartialModIface</span></a></span><span>
</span><span id="line-84"></span><span id="mkPartialIface"><span class="annot"><span class="annottext">mkPartialIface :: HscEnv -&gt; ModDetails -&gt; ModGuts -&gt; PartialModIface
</span><a href="GHC.Iface.Make.html#mkPartialIface"><span class="hs-identifier hs-var hs-var">mkPartialIface</span></a></span></span><span> </span><span id="local-6989586621681176717"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176717"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681176716"><span class="annot"><span class="annottext">ModDetails
</span><a href="#local-6989586621681176716"><span class="hs-identifier hs-var">mod_details</span></a></span></span><span>
</span><span id="line-85"></span><span>  </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mg_module :: ModGuts -&gt; Module
</span><a href="GHC.Driver.Types.html#mg_module"><span class="hs-identifier hs-var">mg_module</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176713"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176713"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span>
</span><span id="line-86"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_hsc_src :: ModGuts -&gt; HscSource
</span><a href="GHC.Driver.Types.html#mg_hsc_src"><span class="hs-identifier hs-var">mg_hsc_src</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176711"><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621681176711"><span class="hs-identifier hs-var">hsc_src</span></a></span></span><span>
</span><span id="line-87"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_usages :: ModGuts -&gt; [Usage]
</span><a href="GHC.Driver.Types.html#mg_usages"><span class="hs-identifier hs-var">mg_usages</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176709"><span class="annot"><span class="annottext">[Usage]
</span><a href="#local-6989586621681176709"><span class="hs-identifier hs-var">usages</span></a></span></span><span>
</span><span id="line-88"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_used_th :: ModGuts -&gt; Bool
</span><a href="GHC.Driver.Types.html#mg_used_th"><span class="hs-identifier hs-var">mg_used_th</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176707"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176707"><span class="hs-identifier hs-var">used_th</span></a></span></span><span>
</span><span id="line-89"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_deps :: ModGuts -&gt; Dependencies
</span><a href="GHC.Driver.Types.html#mg_deps"><span class="hs-identifier hs-var">mg_deps</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176705"><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681176705"><span class="hs-identifier hs-var">deps</span></a></span></span><span>
</span><span id="line-90"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_rdr_env :: ModGuts -&gt; GlobalRdrEnv
</span><a href="GHC.Driver.Types.html#mg_rdr_env"><span class="hs-identifier hs-var">mg_rdr_env</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176703"><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176703"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span>
</span><span id="line-91"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_fix_env :: ModGuts -&gt; FixityEnv
</span><a href="GHC.Driver.Types.html#mg_fix_env"><span class="hs-identifier hs-var">mg_fix_env</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176701"><span class="annot"><span class="annottext">FixityEnv
</span><a href="#local-6989586621681176701"><span class="hs-identifier hs-var">fix_env</span></a></span></span><span>
</span><span id="line-92"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_warns :: ModGuts -&gt; Warnings
</span><a href="GHC.Driver.Types.html#mg_warns"><span class="hs-identifier hs-var">mg_warns</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176699"><span class="annot"><span class="annottext">Warnings
</span><a href="#local-6989586621681176699"><span class="hs-identifier hs-var">warns</span></a></span></span><span>
</span><span id="line-93"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_hpc_info :: ModGuts -&gt; HpcInfo
</span><a href="GHC.Driver.Types.html#mg_hpc_info"><span class="hs-identifier hs-var">mg_hpc_info</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176697"><span class="annot"><span class="annottext">HpcInfo
</span><a href="#local-6989586621681176697"><span class="hs-identifier hs-var">hpc_info</span></a></span></span><span>
</span><span id="line-94"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_safe_haskell :: ModGuts -&gt; SafeHaskellMode
</span><a href="GHC.Driver.Types.html#mg_safe_haskell"><span class="hs-identifier hs-var">mg_safe_haskell</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176695"><span class="annot"><span class="annottext">SafeHaskellMode
</span><a href="#local-6989586621681176695"><span class="hs-identifier hs-var">safe_mode</span></a></span></span><span>
</span><span id="line-95"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_trust_pkg :: ModGuts -&gt; Bool
</span><a href="GHC.Driver.Types.html#mg_trust_pkg"><span class="hs-identifier hs-var">mg_trust_pkg</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176693"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176693"><span class="hs-identifier hs-var">self_trust</span></a></span></span><span>
</span><span id="line-96"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_doc_hdr :: ModGuts -&gt; Maybe HsDocString
</span><a href="GHC.Driver.Types.html#mg_doc_hdr"><span class="hs-identifier hs-var">mg_doc_hdr</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176691"><span class="annot"><span class="annottext">Maybe HsDocString
</span><a href="#local-6989586621681176691"><span class="hs-identifier hs-var">doc_hdr</span></a></span></span><span>
</span><span id="line-97"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_decl_docs :: ModGuts -&gt; DeclDocMap
</span><a href="GHC.Driver.Types.html#mg_decl_docs"><span class="hs-identifier hs-var">mg_decl_docs</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176689"><span class="annot"><span class="annottext">DeclDocMap
</span><a href="#local-6989586621681176689"><span class="hs-identifier hs-var">decl_docs</span></a></span></span><span>
</span><span id="line-98"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">mg_arg_docs :: ModGuts -&gt; ArgDocMap
</span><a href="GHC.Driver.Types.html#mg_arg_docs"><span class="hs-identifier hs-var">mg_arg_docs</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176687"><span class="annot"><span class="annottext">ArgDocMap
</span><a href="#local-6989586621681176687"><span class="hs-identifier hs-var">arg_docs</span></a></span></span><span>
</span><span id="line-99"></span><span>         </span><span class="hs-special">}</span><span>
</span><span id="line-100"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv
-&gt; Module
-&gt; HscSource
-&gt; Bool
-&gt; Dependencies
-&gt; GlobalRdrEnv
-&gt; FixityEnv
-&gt; Warnings
-&gt; HpcInfo
-&gt; Bool
-&gt; SafeHaskellMode
-&gt; [Usage]
-&gt; Maybe HsDocString
-&gt; DeclDocMap
-&gt; ArgDocMap
-&gt; ModDetails
-&gt; PartialModIface
</span><a href="GHC.Iface.Make.html#mkIface_"><span class="hs-identifier hs-var">mkIface_</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176717"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176713"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621681176711"><span class="hs-identifier hs-var">hsc_src</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176707"><span class="hs-identifier hs-var">used_th</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681176705"><span class="hs-identifier hs-var">deps</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176703"><span class="hs-identifier hs-var">rdr_env</span></a></span><span> </span><span class="annot"><span class="annottext">FixityEnv
</span><a href="#local-6989586621681176701"><span class="hs-identifier hs-var">fix_env</span></a></span><span> </span><span class="annot"><span class="annottext">Warnings
</span><a href="#local-6989586621681176699"><span class="hs-identifier hs-var">warns</span></a></span><span> </span><span class="annot"><span class="annottext">HpcInfo
</span><a href="#local-6989586621681176697"><span class="hs-identifier hs-var">hpc_info</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176693"><span class="hs-identifier hs-var">self_trust</span></a></span><span>
</span><span id="line-101"></span><span>             </span><span class="annot"><span class="annottext">SafeHaskellMode
</span><a href="#local-6989586621681176695"><span class="hs-identifier hs-var">safe_mode</span></a></span><span> </span><span class="annot"><span class="annottext">[Usage]
</span><a href="#local-6989586621681176709"><span class="hs-identifier hs-var">usages</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe HsDocString
</span><a href="#local-6989586621681176691"><span class="hs-identifier hs-var">doc_hdr</span></a></span><span> </span><span class="annot"><span class="annottext">DeclDocMap
</span><a href="#local-6989586621681176689"><span class="hs-identifier hs-var">decl_docs</span></a></span><span> </span><span class="annot"><span class="annottext">ArgDocMap
</span><a href="#local-6989586621681176687"><span class="hs-identifier hs-var">arg_docs</span></a></span><span> </span><span class="annot"><span class="annottext">ModDetails
</span><a href="#local-6989586621681176716"><span class="hs-identifier hs-var">mod_details</span></a></span><span>
</span><span id="line-102"></span><span>
</span><span id="line-103"></span><span class="hs-comment">-- | Fully instantiate an interface. Adds fingerprints and potentially code</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- generator produced information.</span><span>
</span><span id="line-105"></span><span class="hs-comment">--</span><span>
</span><span id="line-106"></span><span class="hs-comment">-- CgInfos is not available when not generating code (-fno-code), or when not</span><span>
</span><span id="line-107"></span><span class="hs-comment">-- generating interface pragmas (-fomit-interface-pragmas). See also</span><span>
</span><span id="line-108"></span><span class="hs-comment">-- Note [Conveying CAF-info and LFInfo between modules] in GHC.StgToCmm.Types.</span><span>
</span><span id="line-109"></span><span class="annot"><a href="GHC.Iface.Make.html#mkFullIface"><span class="hs-identifier hs-type">mkFullIface</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#PartialModIface"><span class="hs-identifier hs-type">PartialModIface</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#CgInfos"><span class="hs-identifier hs-type">CgInfos</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-110"></span><span id="mkFullIface"><span class="annot"><span class="annottext">mkFullIface :: HscEnv -&gt; PartialModIface -&gt; Maybe CgInfos -&gt; IO ModIface
</span><a href="GHC.Iface.Make.html#mkFullIface"><span class="hs-identifier hs-var hs-var">mkFullIface</span></a></span></span><span> </span><span id="local-6989586621681176685"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176685"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681176684"><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681176684"><span class="hs-identifier hs-var">partial_iface</span></a></span></span><span> </span><span id="local-6989586621681176683"><span class="annot"><span class="annottext">Maybe CgInfos
</span><a href="#local-6989586621681176683"><span class="hs-identifier hs-var">mb_cg_infos</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-111"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176682"><span class="annot"><span class="annottext">decls :: [IfaceDeclExts 'ModIfaceCore]
</span><a href="#local-6989586621681176682"><span class="hs-identifier hs-var hs-var">decls</span></a></span></span><span>
</span><span id="line-112"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_OmitInterfacePragmas"><span class="hs-identifier hs-var">Opt_OmitInterfacePragmas</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176685"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-113"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceDeclExts 'ModIfaceCore]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceDeclExts phase]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var hs-var">mi_decls</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681176684"><span class="hs-identifier hs-var">partial_iface</span></a></span><span>
</span><span id="line-114"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-115"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl] -&gt; Maybe CgInfos -&gt; [IfaceDecl]
</span><a href="GHC.Iface.Make.html#updateDecl"><span class="hs-identifier hs-var">updateDecl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PartialModIface -&gt; [IfaceDeclExts 'ModIfaceCore]
forall (phase :: ModIfacePhase).
ModIface_ phase -&gt; [IfaceDeclExts phase]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var hs-var">mi_decls</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681176684"><span class="hs-identifier hs-var">partial_iface</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe CgInfos
</span><a href="#local-6989586621681176683"><span class="hs-identifier hs-var">mb_cg_infos</span></a></span><span>
</span><span id="line-116"></span><span>
</span><span id="line-117"></span><span>    </span><span id="local-6989586621681176676"><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176676"><span class="hs-identifier hs-var">full_iface</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-118"></span><span>      </span><span class="hs-pragma">{-# SCC</span><span> </span><span class="hs-pragma">&quot;addFingerprints&quot;</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-119"></span><span>      </span><span class="annot"><span class="annottext">HscEnv -&gt; PartialModIface -&gt; IO ModIface
</span><a href="GHC.Iface.Recomp.html#addFingerprints"><span class="hs-identifier hs-var">addFingerprints</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176685"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681176684"><span class="hs-identifier hs-var">partial_iface</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mi_decls :: [IfaceDeclExts 'ModIfaceCore]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var">mi_decls</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
[IfaceDeclExts 'ModIfaceCore]
</span><a href="#local-6989586621681176682"><span class="hs-identifier hs-var">decls</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-comment">-- Debug printing</span><span>
</span><span id="line-122"></span><span>    </span><span class="annot"><span class="annottext">DynFlags -&gt; DumpFlag -&gt; String -&gt; DumpFormat -&gt; SDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#dumpIfSet_dyn"><span class="hs-identifier hs-var">dumpIfSet_dyn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176685"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">DumpFlag
</span><a href="GHC.Driver.Flags.html#Opt_D_dump_hi"><span class="hs-identifier hs-var">Opt_D_dump_hi</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;FINAL INTERFACE&quot;</span></span><span> </span><span class="annot"><span class="annottext">DumpFormat
</span><a href="GHC.Utils.Error.html#FormatText"><span class="hs-identifier hs-var">FormatText</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModIface -&gt; SDoc
</span><a href="GHC.Iface.Load.html#pprModIface"><span class="hs-identifier hs-var">pprModIface</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176676"><span class="hs-identifier hs-var">full_iface</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>
</span><span id="line-124"></span><span>    </span><span class="annot"><span class="annottext">ModIface -&gt; IO ModIface
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface
</span><a href="#local-6989586621681176676"><span class="hs-identifier hs-var">full_iface</span></a></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="annot"><a href="GHC.Iface.Make.html#updateDecl"><span class="hs-identifier hs-type">updateDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#CgInfos"><span class="hs-identifier hs-type">CgInfos</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-127"></span><span id="updateDecl"><span class="annot"><span class="annottext">updateDecl :: [IfaceDecl] -&gt; Maybe CgInfos -&gt; [IfaceDecl]
</span><a href="GHC.Iface.Make.html#updateDecl"><span class="hs-identifier hs-var hs-var">updateDecl</span></a></span></span><span> </span><span id="local-6989586621681176670"><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681176670"><span class="hs-identifier hs-var">decls</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe CgInfos
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681176670"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-128"></span><span class="annot"><a href="GHC.Iface.Make.html#updateDecl"><span class="hs-identifier hs-var">updateDecl</span></a></span><span> </span><span id="local-6989586621681176669"><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681176669"><span class="hs-identifier hs-var">decls</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><a href="GHC.StgToCmm.Types.html#CgInfos"><span class="hs-identifier hs-type">CgInfos</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cgNonCafs :: CgInfos -&gt; NonCaffySet
</span><a href="GHC.StgToCmm.Types.html#cgNonCafs"><span class="hs-identifier hs-var">cgNonCafs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Name.Set.html#NonCaffySet"><span class="hs-identifier hs-type">NonCaffySet</span></a></span><span> </span><span id="local-6989586621681176665"><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621681176665"><span class="hs-identifier hs-var">non_cafs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cgLFInfos :: CgInfos -&gt; ModuleLFInfos
</span><a href="GHC.StgToCmm.Types.html#cgLFInfos"><span class="hs-identifier hs-var">cgLFInfos</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176663"><span class="annot"><span class="annottext">ModuleLFInfos
</span><a href="#local-6989586621681176663"><span class="hs-identifier hs-var">lf_infos</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceDecl -&gt; IfaceDecl) -&gt; [IfaceDecl] -&gt; [IfaceDecl]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; IfaceDecl
</span><a href="#local-6989586621681176662"><span class="hs-identifier hs-var">update_decl</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
</span><a href="#local-6989586621681176669"><span class="hs-identifier hs-var">decls</span></a></span><span>
</span><span id="line-129"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-130"></span><span>    </span><span id="local-6989586621681176662"><span class="annot"><span class="annottext">update_decl :: IfaceDecl -&gt; IfaceDecl
</span><a href="#local-6989586621681176662"><span class="hs-identifier hs-var hs-var">update_decl</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceId"><span class="hs-identifier hs-type">IfaceId</span></a></span><span> </span><span id="local-6989586621681176657"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176657"><span class="hs-identifier hs-var">nm</span></a></span></span><span> </span><span id="local-6989586621681176656"><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621681176656"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621681176655"><span class="annot"><span class="annottext">IfaceIdDetails
</span><a href="#local-6989586621681176655"><span class="hs-identifier hs-var">details</span></a></span></span><span> </span><span id="local-6989586621681176654"><span class="annot"><span class="annottext">IfaceIdInfo
</span><a href="#local-6989586621681176654"><span class="hs-identifier hs-var">infos</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176653"><span class="annot"><span class="annottext">not_caffy :: Bool
</span><a href="#local-6989586621681176653"><span class="hs-identifier hs-var hs-var">not_caffy</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; NameSet -&gt; Bool
</span><a href="GHC.Types.Name.Set.html#elemNameSet"><span class="hs-identifier hs-var">elemNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176657"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621681176665"><span class="hs-identifier hs-var">non_cafs</span></a></span><span>
</span><span id="line-132"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176651"><span class="annot"><span class="annottext">mb_lf_info :: Maybe LambdaFormInfo
</span><a href="#local-6989586621681176651"><span class="hs-identifier hs-var hs-var">mb_lf_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleLFInfos -&gt; Name -&gt; Maybe LambdaFormInfo
forall a. NameEnv a -&gt; Name -&gt; Maybe a
</span><a href="GHC.Types.Name.Env.html#lookupNameEnv"><span class="hs-identifier hs-var">lookupNameEnv</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleLFInfos
</span><a href="#local-6989586621681176663"><span class="hs-identifier hs-var">lf_infos</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176657"><span class="hs-identifier hs-var">nm</span></a></span><span>
</span><span id="line-133"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="hs-identifier">WARN</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isNothing</span><span> </span><span class="hs-identifier">mb_lf_info</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">text</span><span> </span><span class="hs-string">&quot;Name without LFInfo:&quot;</span><span> </span><span class="hs-operator">&lt;+&gt;</span><span> </span><span class="hs-identifier">ppr</span><span> </span><span class="hs-identifier">nm</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">True</span><span>
</span><span id="line-134"></span><span>        </span><span class="hs-comment">-- Only allocate a new IfaceId if we're going to update the infos</span><span>
</span><span id="line-135"></span><span>      </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe LambdaFormInfo -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LambdaFormInfo
</span><a href="#local-6989586621681176651"><span class="hs-identifier hs-var">mb_lf_info</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176653"><span class="hs-identifier hs-var">not_caffy</span></a></span><span>
</span><span id="line-136"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; IfaceType -&gt; IfaceIdDetails -&gt; IfaceIdInfo -&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceId"><span class="hs-identifier hs-var">IfaceId</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176657"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621681176656"><span class="hs-identifier hs-var">ty</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceIdDetails
</span><a href="#local-6989586621681176655"><span class="hs-identifier hs-var">details</span></a></span><span> </span><span class="annot"><span class="annottext">(IfaceIdInfo -&gt; IfaceDecl) -&gt; IfaceIdInfo -&gt; IfaceDecl
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-137"></span><span>          </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176653"><span class="hs-identifier hs-var">not_caffy</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IfaceInfoItem
</span><a href="GHC.Iface.Syntax.html#HsNoCafRefs"><span class="hs-identifier hs-var">HsNoCafRefs</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceInfoItem -&gt; IfaceIdInfo -&gt; IfaceIdInfo
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">IfaceIdInfo -&gt; IfaceIdInfo
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>          </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe LambdaFormInfo
</span><a href="#local-6989586621681176651"><span class="hs-identifier hs-var">mb_lf_info</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-139"></span><span>             </span><span class="annot"><span class="annottext">Maybe LambdaFormInfo
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IfaceIdInfo
</span><a href="#local-6989586621681176654"><span class="hs-identifier hs-var">infos</span></a></span><span> </span><span class="hs-comment">-- LFInfos not available when building .cmm files</span><span>
</span><span id="line-140"></span><span>             </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176640"><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681176640"><span class="hs-identifier hs-var">lf_info</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IfaceLFInfo -&gt; IfaceInfoItem
</span><a href="GHC.Iface.Syntax.html#HsLFInfo"><span class="hs-identifier hs-var">HsLFInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; LambdaFormInfo -&gt; IfaceLFInfo
</span><a href="GHC.CoreToIface.html#toIfaceLFInfo"><span class="hs-identifier hs-var">toIfaceLFInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176657"><span class="hs-identifier hs-var">nm</span></a></span><span> </span><span class="annot"><span class="annottext">LambdaFormInfo
</span><a href="#local-6989586621681176640"><span class="hs-identifier hs-var">lf_info</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IfaceInfoItem -&gt; IfaceIdInfo -&gt; IfaceIdInfo
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">IfaceIdInfo
</span><a href="#local-6989586621681176654"><span class="hs-identifier hs-var">infos</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span>    </span><span class="annot"><a href="#local-6989586621681176662"><span class="hs-identifier hs-var">update_decl</span></a></span><span> </span><span id="local-6989586621681176637"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681176637"><span class="hs-identifier hs-var">decl</span></a></span></span><span>
</span><span id="line-143"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681176637"><span class="hs-identifier hs-var">decl</span></a></span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span class="hs-comment">-- | Make an interface from the results of typechecking only.  Useful</span><span>
</span><span id="line-146"></span><span class="hs-comment">-- for non-optimising compilation, or where we aren't generating any</span><span>
</span><span id="line-147"></span><span class="hs-comment">-- object code at all ('HscNothing').</span><span>
</span><span id="line-148"></span><span class="annot"><a href="GHC.Iface.Make.html#mkIfaceTc"><span class="hs-identifier hs-type">mkIfaceTc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span>
</span><span id="line-149"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#SafeHaskellMode"><span class="hs-identifier hs-type">SafeHaskellMode</span></a></span><span>    </span><span class="hs-comment">-- The safe haskell mode</span><span>
</span><span id="line-150"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModDetails"><span class="hs-identifier hs-type">ModDetails</span></a></span><span>         </span><span class="hs-comment">-- gotten from mkBootModDetails, probably</span><span>
</span><span id="line-151"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span>           </span><span class="hs-comment">-- Usages, deprecations, etc</span><span>
</span><span id="line-152"></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span>
</span><span id="line-153"></span><span id="mkIfaceTc"><span class="annot"><span class="annottext">mkIfaceTc :: HscEnv -&gt; SafeHaskellMode -&gt; ModDetails -&gt; TcGblEnv -&gt; IO ModIface
</span><a href="GHC.Iface.Make.html#mkIfaceTc"><span class="hs-identifier hs-var hs-var">mkIfaceTc</span></a></span></span><span> </span><span id="local-6989586621681176636"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176636"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span> </span><span id="local-6989586621681176635"><span class="annot"><span class="annottext">SafeHaskellMode
</span><a href="#local-6989586621681176635"><span class="hs-identifier hs-var">safe_mode</span></a></span></span><span> </span><span id="local-6989586621681176634"><span class="annot"><span class="annottext">ModDetails
</span><a href="#local-6989586621681176634"><span class="hs-identifier hs-var">mod_details</span></a></span></span><span>
</span><span id="line-154"></span><span>  </span><span id="local-6989586621681176633"><span class="annot"><span class="annottext">tc_result :: TcGblEnv
</span><a href="#local-6989586621681176633"><span class="hs-identifier hs-var">tc_result</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Tc.Types.html#TcGblEnv"><span class="hs-identifier hs-type">TcGblEnv</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">tcg_mod :: TcGblEnv -&gt; Module
</span><a href="GHC.Tc.Types.html#tcg_mod"><span class="hs-identifier hs-var">tcg_mod</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176630"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176630"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-155"></span><span>                      </span><span class="annot"><span class="annottext">tcg_src :: TcGblEnv -&gt; HscSource
</span><a href="GHC.Tc.Types.html#tcg_src"><span class="hs-identifier hs-var">tcg_src</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176628"><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621681176628"><span class="hs-identifier hs-var">hsc_src</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-156"></span><span>                      </span><span class="annot"><span class="annottext">tcg_imports :: TcGblEnv -&gt; ImportAvails
</span><a href="GHC.Tc.Types.html#tcg_imports"><span class="hs-identifier hs-var">tcg_imports</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176626"><span class="annot"><span class="annottext">ImportAvails
</span><a href="#local-6989586621681176626"><span class="hs-identifier hs-var">imports</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-157"></span><span>                      </span><span class="annot"><span class="annottext">tcg_rdr_env :: TcGblEnv -&gt; GlobalRdrEnv
</span><a href="GHC.Tc.Types.html#tcg_rdr_env"><span class="hs-identifier hs-var">tcg_rdr_env</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176624"><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176624"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-158"></span><span>                      </span><span class="annot"><span class="annottext">tcg_fix_env :: TcGblEnv -&gt; FixityEnv
</span><a href="GHC.Tc.Types.html#tcg_fix_env"><span class="hs-identifier hs-var">tcg_fix_env</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176622"><span class="annot"><span class="annottext">FixityEnv
</span><a href="#local-6989586621681176622"><span class="hs-identifier hs-var">fix_env</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-159"></span><span>                      </span><span class="annot"><span class="annottext">tcg_merged :: TcGblEnv -&gt; [(Module, Fingerprint)]
</span><a href="GHC.Tc.Types.html#tcg_merged"><span class="hs-identifier hs-var">tcg_merged</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176620"><span class="annot"><span class="annottext">[(Module, Fingerprint)]
</span><a href="#local-6989586621681176620"><span class="hs-identifier hs-var">merged</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-160"></span><span>                      </span><span class="annot"><span class="annottext">tcg_warns :: TcGblEnv -&gt; Warnings
</span><a href="GHC.Tc.Types.html#tcg_warns"><span class="hs-identifier hs-var">tcg_warns</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176618"><span class="annot"><span class="annottext">Warnings
</span><a href="#local-6989586621681176618"><span class="hs-identifier hs-var">warns</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-161"></span><span>                      </span><span class="annot"><span class="annottext">tcg_hpc :: TcGblEnv -&gt; Bool
</span><a href="GHC.Tc.Types.html#tcg_hpc"><span class="hs-identifier hs-var">tcg_hpc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176616"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176616"><span class="hs-identifier hs-var">other_hpc_info</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-162"></span><span>                      </span><span class="annot"><span class="annottext">tcg_th_splice_used :: TcGblEnv -&gt; TcRef Bool
</span><a href="GHC.Tc.Types.html#tcg_th_splice_used"><span class="hs-identifier hs-var">tcg_th_splice_used</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176614"><span class="annot"><span class="annottext">TcRef Bool
</span><a href="#local-6989586621681176614"><span class="hs-identifier hs-var">tc_splice_used</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-163"></span><span>                      </span><span class="annot"><span class="annottext">tcg_dependent_files :: TcGblEnv -&gt; TcRef [String]
</span><a href="GHC.Tc.Types.html#tcg_dependent_files"><span class="hs-identifier hs-var">tcg_dependent_files</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176612"><span class="annot"><span class="annottext">TcRef [String]
</span><a href="#local-6989586621681176612"><span class="hs-identifier hs-var">dependent_files</span></a></span></span><span>
</span><span id="line-164"></span><span>                    </span><span class="hs-special">}</span><span>
</span><span id="line-165"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-166"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176611"><span class="annot"><span class="annottext">used_names :: NameSet
</span><a href="#local-6989586621681176611"><span class="hs-identifier hs-var hs-var">used_names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TcGblEnv -&gt; NameSet
</span><a href="GHC.HsToCore.Usage.html#mkUsedNames"><span class="hs-identifier hs-var">mkUsedNames</span></a></span><span> </span><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621681176633"><span class="hs-identifier hs-var">tc_result</span></a></span><span>
</span><span id="line-167"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176610"><span class="annot"><span class="annottext">pluginModules :: [ModIface]
</span><a href="#local-6989586621681176610"><span class="hs-identifier hs-var hs-var">pluginModules</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-168"></span><span>                </span><span class="annot"><span class="annottext">(LoadedPlugin -&gt; ModIface) -&gt; [LoadedPlugin] -&gt; [ModIface]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">LoadedPlugin -&gt; ModIface
</span><a href="GHC.Driver.Plugins.html#lpModule"><span class="hs-identifier hs-var hs-var">lpModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; [LoadedPlugin]
</span><a href="GHC.Driver.Session.html#cachedPlugins"><span class="hs-identifier hs-var hs-var">cachedPlugins</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176636"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>          </span><span id="local-6989586621681176607"><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681176607"><span class="hs-identifier hs-var">deps</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; [Module] -&gt; TcGblEnv -&gt; IO Dependencies
</span><a href="GHC.HsToCore.Usage.html#mkDependencies"><span class="hs-identifier hs-var">mkDependencies</span></a></span><span>
</span><span id="line-170"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; UnitId
</span><a href="GHC.Driver.Session.html#homeUnitId"><span class="hs-identifier hs-var hs-var">homeUnitId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176636"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModIface -&gt; Module) -&gt; [ModIface] -&gt; [Module]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ModIface -&gt; Module
forall (phase :: ModIfacePhase). ModIface_ phase -&gt; Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var hs-var">mi_module</span></a></span><span> </span><span class="annot"><span class="annottext">[ModIface]
</span><a href="#local-6989586621681176610"><span class="hs-identifier hs-var">pluginModules</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621681176633"><span class="hs-identifier hs-var">tc_result</span></a></span><span>
</span><span id="line-172"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176604"><span class="annot"><span class="annottext">hpc_info :: HpcInfo
</span><a href="#local-6989586621681176604"><span class="hs-identifier hs-var hs-var">hpc_info</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; HpcInfo
</span><a href="GHC.Driver.Types.html#emptyHpcInfo"><span class="hs-identifier hs-var">emptyHpcInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176616"><span class="hs-identifier hs-var">other_hpc_info</span></a></span><span>
</span><span id="line-173"></span><span>          </span><span id="local-6989586621681176602"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176602"><span class="hs-identifier hs-var">used_th</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TcRef Bool -&gt; IO Bool
forall a. IORef a -&gt; IO a
</span><a href="../../base/src/GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">TcRef Bool
</span><a href="#local-6989586621681176614"><span class="hs-identifier hs-var">tc_splice_used</span></a></span><span>
</span><span id="line-174"></span><span>          </span><span id="local-6989586621681176600"><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621681176600"><span class="hs-identifier hs-var">dep_files</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TcRef [String] -&gt; IO [String]
forall a. IORef a -&gt; IO a
</span><a href="../../base/src/GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span> </span><span class="annot"><span class="annottext">TcRef [String]
</span><a href="#local-6989586621681176612"><span class="hs-identifier hs-var">dependent_files</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>          </span><span class="hs-comment">-- Do NOT use semantic module here; this_mod in mkUsageInfo</span><span>
</span><span id="line-176"></span><span>          </span><span class="hs-comment">-- is used solely to decide if we should record a dependency</span><span>
</span><span id="line-177"></span><span>          </span><span class="hs-comment">-- or not.  When we instantiate a signature, the semantic</span><span>
</span><span id="line-178"></span><span>          </span><span class="hs-comment">-- module is something we want to record dependencies for,</span><span>
</span><span id="line-179"></span><span>          </span><span class="hs-comment">-- but if you pass that in here, we'll decide it's the local</span><span>
</span><span id="line-180"></span><span>          </span><span class="hs-comment">-- module and does not need to be recorded as a dependency.</span><span>
</span><span id="line-181"></span><span>          </span><span class="hs-comment">-- See Note [Identity versus semantic module]</span><span>
</span><span id="line-182"></span><span>          </span><span id="local-6989586621681176599"><span class="annot"><span class="annottext">[Usage]
</span><a href="#local-6989586621681176599"><span class="hs-identifier hs-var">usages</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">HscEnv
-&gt; Module
-&gt; ImportedMods
-&gt; NameSet
-&gt; [String]
-&gt; [(Module, Fingerprint)]
-&gt; [ModIface]
-&gt; IO [Usage]
</span><a href="GHC.HsToCore.Usage.html#mkUsageInfo"><span class="hs-identifier hs-var">mkUsageInfo</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176636"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176630"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ImportAvails -&gt; ImportedMods
</span><a href="GHC.Tc.Types.html#imp_mods"><span class="hs-identifier hs-var hs-var">imp_mods</span></a></span><span> </span><span class="annot"><span class="annottext">ImportAvails
</span><a href="#local-6989586621681176626"><span class="hs-identifier hs-var">imports</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621681176611"><span class="hs-identifier hs-var">used_names</span></a></span><span>
</span><span id="line-183"></span><span>                      </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621681176600"><span class="hs-identifier hs-var">dep_files</span></a></span><span> </span><span class="annot"><span class="annottext">[(Module, Fingerprint)]
</span><a href="#local-6989586621681176620"><span class="hs-identifier hs-var">merged</span></a></span><span> </span><span class="annot"><span class="annottext">[ModIface]
</span><a href="#local-6989586621681176610"><span class="hs-identifier hs-var">pluginModules</span></a></span><span>
</span><span id="line-184"></span><span>
</span><span id="line-185"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681176597"><span class="annot"><span class="annottext">Maybe HsDocString
</span><a href="#local-6989586621681176597"><span class="hs-identifier hs-var">doc_hdr'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176596"><span class="annot"><span class="annottext">DeclDocMap
</span><a href="#local-6989586621681176596"><span class="hs-identifier hs-var">doc_map</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176595"><span class="annot"><span class="annottext">ArgDocMap
</span><a href="#local-6989586621681176595"><span class="hs-identifier hs-var">arg_map</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TcGblEnv -&gt; (Maybe HsDocString, DeclDocMap, ArgDocMap)
</span><a href="GHC.HsToCore.Docs.html#extractDocs"><span class="hs-identifier hs-var">extractDocs</span></a></span><span> </span><span class="annot"><span class="annottext">TcGblEnv
</span><a href="#local-6989586621681176633"><span class="hs-identifier hs-var">tc_result</span></a></span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span>          </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176593"><span class="annot"><span class="annottext">partial_iface :: PartialModIface
</span><a href="#local-6989586621681176593"><span class="hs-identifier hs-var hs-var">partial_iface</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv
-&gt; Module
-&gt; HscSource
-&gt; Bool
-&gt; Dependencies
-&gt; GlobalRdrEnv
-&gt; FixityEnv
-&gt; Warnings
-&gt; HpcInfo
-&gt; Bool
-&gt; SafeHaskellMode
-&gt; [Usage]
-&gt; Maybe HsDocString
-&gt; DeclDocMap
-&gt; ArgDocMap
-&gt; ModDetails
-&gt; PartialModIface
</span><a href="GHC.Iface.Make.html#mkIface_"><span class="hs-identifier hs-var">mkIface_</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176636"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-188"></span><span>                   </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176630"><span class="hs-identifier hs-var">this_mod</span></a></span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621681176628"><span class="hs-identifier hs-var">hsc_src</span></a></span><span>
</span><span id="line-189"></span><span>                   </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176602"><span class="hs-identifier hs-var">used_th</span></a></span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681176607"><span class="hs-identifier hs-var">deps</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176624"><span class="hs-identifier hs-var">rdr_env</span></a></span><span>
</span><span id="line-190"></span><span>                   </span><span class="annot"><span class="annottext">FixityEnv
</span><a href="#local-6989586621681176622"><span class="hs-identifier hs-var">fix_env</span></a></span><span> </span><span class="annot"><span class="annottext">Warnings
</span><a href="#local-6989586621681176618"><span class="hs-identifier hs-var">warns</span></a></span><span> </span><span class="annot"><span class="annottext">HpcInfo
</span><a href="#local-6989586621681176604"><span class="hs-identifier hs-var">hpc_info</span></a></span><span>
</span><span id="line-191"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ImportAvails -&gt; Bool
</span><a href="GHC.Tc.Types.html#imp_trust_own_pkg"><span class="hs-identifier hs-var hs-var">imp_trust_own_pkg</span></a></span><span> </span><span class="annot"><span class="annottext">ImportAvails
</span><a href="#local-6989586621681176626"><span class="hs-identifier hs-var">imports</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SafeHaskellMode
</span><a href="#local-6989586621681176635"><span class="hs-identifier hs-var">safe_mode</span></a></span><span> </span><span class="annot"><span class="annottext">[Usage]
</span><a href="#local-6989586621681176599"><span class="hs-identifier hs-var">usages</span></a></span><span>
</span><span id="line-192"></span><span>                   </span><span class="annot"><span class="annottext">Maybe HsDocString
</span><a href="#local-6989586621681176597"><span class="hs-identifier hs-var">doc_hdr'</span></a></span><span> </span><span class="annot"><span class="annottext">DeclDocMap
</span><a href="#local-6989586621681176596"><span class="hs-identifier hs-var">doc_map</span></a></span><span> </span><span class="annot"><span class="annottext">ArgDocMap
</span><a href="#local-6989586621681176595"><span class="hs-identifier hs-var">arg_map</span></a></span><span>
</span><span id="line-193"></span><span>                   </span><span class="annot"><span class="annottext">ModDetails
</span><a href="#local-6989586621681176634"><span class="hs-identifier hs-var">mod_details</span></a></span><span>
</span><span id="line-194"></span><span>
</span><span id="line-195"></span><span>          </span><span class="annot"><span class="annottext">HscEnv -&gt; PartialModIface -&gt; Maybe CgInfos -&gt; IO ModIface
</span><a href="GHC.Iface.Make.html#mkFullIface"><span class="hs-identifier hs-var">mkFullIface</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176636"><span class="hs-identifier hs-var">hsc_env</span></a></span><span> </span><span class="annot"><span class="annottext">PartialModIface
</span><a href="#local-6989586621681176593"><span class="hs-identifier hs-var">partial_iface</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CgInfos
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-196"></span><span>
</span><span id="line-197"></span><span class="annot"><a href="GHC.Iface.Make.html#mkIface_"><span class="hs-identifier hs-type">mkIface_</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HscEnv"><span class="hs-identifier hs-type">HscEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Unit.Types.html#Module"><span class="hs-identifier hs-type">Module</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Phases.html#HscSource"><span class="hs-identifier hs-type">HscSource</span></a></span><span>
</span><span id="line-198"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Dependencies"><span class="hs-identifier hs-type">Dependencies</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#GlobalRdrEnv"><span class="hs-identifier hs-type">GlobalRdrEnv</span></a></span><span>
</span><span id="line-199"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Name.Env.html#NameEnv"><span class="hs-identifier hs-type">NameEnv</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#FixItem"><span class="hs-identifier hs-type">FixItem</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#Warnings"><span class="hs-identifier hs-type">Warnings</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#HpcInfo"><span class="hs-identifier hs-type">HpcInfo</span></a></span><span>
</span><span id="line-200"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-201"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#SafeHaskellMode"><span class="hs-identifier hs-type">SafeHaskellMode</span></a></span><span>
</span><span id="line-202"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Types.html#Usage"><span class="hs-identifier hs-type">Usage</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-203"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#HsDocString"><span class="hs-identifier hs-type">HsDocString</span></a></span><span>
</span><span id="line-204"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#DeclDocMap"><span class="hs-identifier hs-type">DeclDocMap</span></a></span><span>
</span><span id="line-205"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Hs.Doc.html#ArgDocMap"><span class="hs-identifier hs-type">ArgDocMap</span></a></span><span>
</span><span id="line-206"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModDetails"><span class="hs-identifier hs-type">ModDetails</span></a></span><span>
</span><span id="line-207"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#PartialModIface"><span class="hs-identifier hs-type">PartialModIface</span></a></span><span>
</span><span id="line-208"></span><span id="mkIface_"><span class="annot"><span class="annottext">mkIface_ :: HscEnv
-&gt; Module
-&gt; HscSource
-&gt; Bool
-&gt; Dependencies
-&gt; GlobalRdrEnv
-&gt; FixityEnv
-&gt; Warnings
-&gt; HpcInfo
-&gt; Bool
-&gt; SafeHaskellMode
-&gt; [Usage]
-&gt; Maybe HsDocString
-&gt; DeclDocMap
-&gt; ArgDocMap
-&gt; ModDetails
-&gt; PartialModIface
</span><a href="GHC.Iface.Make.html#mkIface_"><span class="hs-identifier hs-var hs-var">mkIface_</span></a></span></span><span> </span><span id="local-6989586621681176591"><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176591"><span class="hs-identifier hs-var">hsc_env</span></a></span></span><span>
</span><span id="line-209"></span><span>         </span><span id="local-6989586621681176590"><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176590"><span class="hs-identifier hs-var">this_mod</span></a></span></span><span> </span><span id="local-6989586621681176589"><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621681176589"><span class="hs-identifier hs-var">hsc_src</span></a></span></span><span> </span><span id="local-6989586621681176588"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176588"><span class="hs-identifier hs-var">used_th</span></a></span></span><span> </span><span id="local-6989586621681176587"><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681176587"><span class="hs-identifier hs-var">deps</span></a></span></span><span> </span><span id="local-6989586621681176586"><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176586"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span> </span><span id="local-6989586621681176585"><span class="annot"><span class="annottext">FixityEnv
</span><a href="#local-6989586621681176585"><span class="hs-identifier hs-var">fix_env</span></a></span></span><span> </span><span id="local-6989586621681176584"><span class="annot"><span class="annottext">Warnings
</span><a href="#local-6989586621681176584"><span class="hs-identifier hs-var">src_warns</span></a></span></span><span>
</span><span id="line-210"></span><span>         </span><span id="local-6989586621681176583"><span class="annot"><span class="annottext">HpcInfo
</span><a href="#local-6989586621681176583"><span class="hs-identifier hs-var">hpc_info</span></a></span></span><span> </span><span id="local-6989586621681176582"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176582"><span class="hs-identifier hs-var">pkg_trust_req</span></a></span></span><span> </span><span id="local-6989586621681176581"><span class="annot"><span class="annottext">SafeHaskellMode
</span><a href="#local-6989586621681176581"><span class="hs-identifier hs-var">safe_mode</span></a></span></span><span> </span><span id="local-6989586621681176580"><span class="annot"><span class="annottext">[Usage]
</span><a href="#local-6989586621681176580"><span class="hs-identifier hs-var">usages</span></a></span></span><span>
</span><span id="line-211"></span><span>         </span><span id="local-6989586621681176579"><span class="annot"><span class="annottext">Maybe HsDocString
</span><a href="#local-6989586621681176579"><span class="hs-identifier hs-var">doc_hdr</span></a></span></span><span> </span><span id="local-6989586621681176578"><span class="annot"><span class="annottext">DeclDocMap
</span><a href="#local-6989586621681176578"><span class="hs-identifier hs-var">decl_docs</span></a></span></span><span> </span><span id="local-6989586621681176577"><span class="annot"><span class="annottext">ArgDocMap
</span><a href="#local-6989586621681176577"><span class="hs-identifier hs-var">arg_docs</span></a></span></span><span>
</span><span id="line-212"></span><span>         </span><span class="annot"><a href="GHC.Driver.Types.html#ModDetails"><span class="hs-identifier hs-type">ModDetails</span></a></span><span class="hs-special">{</span><span>  </span><span class="annot"><span class="annottext">md_insts :: ModDetails -&gt; [ClsInst]
</span><a href="GHC.Driver.Types.html#md_insts"><span class="hs-identifier hs-var">md_insts</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176574"><span class="annot"><span class="annottext">[ClsInst]
</span><a href="#local-6989586621681176574"><span class="hs-identifier hs-var">insts</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-213"></span><span>                      </span><span class="annot"><span class="annottext">md_fam_insts :: ModDetails -&gt; [FamInst]
</span><a href="GHC.Driver.Types.html#md_fam_insts"><span class="hs-identifier hs-var">md_fam_insts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176572"><span class="annot"><span class="annottext">[FamInst]
</span><a href="#local-6989586621681176572"><span class="hs-identifier hs-var">fam_insts</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-214"></span><span>                      </span><span class="annot"><span class="annottext">md_rules :: ModDetails -&gt; [CoreRule]
</span><a href="GHC.Driver.Types.html#md_rules"><span class="hs-identifier hs-var">md_rules</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176570"><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621681176570"><span class="hs-identifier hs-var">rules</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-215"></span><span>                      </span><span class="annot"><span class="annottext">md_anns :: ModDetails -&gt; [Annotation]
</span><a href="GHC.Driver.Types.html#md_anns"><span class="hs-identifier hs-var">md_anns</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176568"><span class="annot"><span class="annottext">[Annotation]
</span><a href="#local-6989586621681176568"><span class="hs-identifier hs-var">anns</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-216"></span><span>                      </span><span class="annot"><span class="annottext">md_types :: ModDetails -&gt; TypeEnv
</span><a href="GHC.Driver.Types.html#md_types"><span class="hs-identifier hs-var">md_types</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176566"><span class="annot"><span class="annottext">TypeEnv
</span><a href="#local-6989586621681176566"><span class="hs-identifier hs-var">type_env</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-217"></span><span>                      </span><span class="annot"><span class="annottext">md_exports :: ModDetails -&gt; [AvailInfo]
</span><a href="GHC.Driver.Types.html#md_exports"><span class="hs-identifier hs-var">md_exports</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176564"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621681176564"><span class="hs-identifier hs-var">exports</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-218"></span><span>                      </span><span class="annot"><span class="annottext">md_complete_sigs :: ModDetails -&gt; [CompleteMatch]
</span><a href="GHC.Driver.Types.html#md_complete_sigs"><span class="hs-identifier hs-var">md_complete_sigs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176562"><span class="annot"><span class="annottext">[CompleteMatch]
</span><a href="#local-6989586621681176562"><span class="hs-identifier hs-var">complete_sigs</span></a></span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-219"></span><span class="hs-comment">-- NB:  notice that mkIface does not look at the bindings</span><span>
</span><span id="line-220"></span><span class="hs-comment">--      only at the TypeEnv.  The previous Tidy phase has</span><span>
</span><span id="line-221"></span><span class="hs-comment">--      put exactly the info into the TypeEnv that we want</span><span>
</span><span id="line-222"></span><span class="hs-comment">--      to expose in the interface</span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-225"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176561"><span class="annot"><span class="annottext">semantic_mod :: Module
</span><a href="#local-6989586621681176561"><span class="hs-identifier hs-var hs-var">semantic_mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; ModuleName -&gt; Module
</span><a href="GHC.Driver.Session.html#canonicalizeHomeModule"><span class="hs-identifier hs-var">canonicalizeHomeModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176591"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Module -&gt; ModuleName
forall unit. GenModule unit -&gt; ModuleName
</span><a href="GHC.Unit.Types.html#moduleName"><span class="hs-identifier hs-var hs-var">moduleName</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176590"><span class="hs-identifier hs-var">this_mod</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-226"></span><span>        </span><span id="local-6989586621681176558"><span class="annot"><span class="annottext">entities :: [TyThing]
</span><a href="#local-6989586621681176558"><span class="hs-identifier hs-var hs-var">entities</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TypeEnv -&gt; [TyThing]
</span><a href="GHC.Driver.Types.html#typeEnvElts"><span class="hs-identifier hs-var">typeEnvElts</span></a></span><span> </span><span class="annot"><span class="annottext">TypeEnv
</span><a href="#local-6989586621681176566"><span class="hs-identifier hs-var">type_env</span></a></span><span>
</span><span id="line-227"></span><span>        </span><span id="local-6989586621681176556"><span class="annot"><span class="annottext">decls :: [IfaceDecl]
</span><a href="#local-6989586621681176556"><span class="hs-identifier hs-var hs-var">decls</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; TyThing -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#tyThingToIfaceDecl"><span class="hs-identifier hs-var">tyThingToIfaceDecl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176591"><span class="hs-identifier hs-var">hsc_env</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681176555"><span class="hs-identifier hs-var">entity</span></a></span><span>
</span><span id="line-228"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681176555"><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681176555"><span class="hs-identifier hs-var">entity</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[TyThing]
</span><a href="#local-6989586621681176558"><span class="hs-identifier hs-var">entities</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-229"></span><span>                   </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681176552"><span class="annot"><span class="annottext">name :: Name
</span><a href="#local-6989586621681176552"><span class="hs-identifier hs-var hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyThing -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681176555"><span class="hs-identifier hs-var">entity</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-230"></span><span>                   </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyThing -&gt; Bool
</span><a href="GHC.Driver.Types.html#isImplicitTyThing"><span class="hs-identifier hs-var">isImplicitTyThing</span></a></span><span> </span><span class="annot"><span class="annottext">TyThing
</span><a href="#local-6989586621681176555"><span class="hs-identifier hs-var">entity</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-231"></span><span>                      </span><span class="hs-comment">-- No implicit Ids and class tycons in the interface file</span><span>
</span><span id="line-232"></span><span>                   </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="GHC.Types.Name.html#isWiredInName"><span class="hs-identifier hs-var">isWiredInName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176552"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-233"></span><span>                      </span><span class="hs-comment">-- Nor wired-in things; the compiler knows about them anyhow</span><span>
</span><span id="line-234"></span><span>                   </span><span class="annot"><span class="annottext">Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-var">nameIsLocalOrFrom</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176561"><span class="hs-identifier hs-var">semantic_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176552"><span class="hs-identifier hs-var">name</span></a></span><span>  </span><span class="hs-special">]</span><span>
</span><span id="line-235"></span><span>                      </span><span class="hs-comment">-- Sigh: see Note [Root-main Id] in GHC.Tc.Module</span><span>
</span><span id="line-236"></span><span>                      </span><span class="hs-comment">-- NB: ABSOLUTELY need to check against semantic_mod,</span><span>
</span><span id="line-237"></span><span>                      </span><span class="hs-comment">-- because all of the names in an hsig p[H=&lt;H&gt;]:H</span><span>
</span><span id="line-238"></span><span>                      </span><span class="hs-comment">-- are going to be for &lt;H&gt;, not the former id!</span><span>
</span><span id="line-239"></span><span>                      </span><span class="hs-comment">-- See Note [Identity versus semantic module]</span><span>
</span><span id="line-240"></span><span>
</span><span id="line-241"></span><span>        </span><span id="local-6989586621681176544"><span class="annot"><span class="annottext">fixities :: [(OccName, Fixity)]
</span><a href="#local-6989586621681176544"><span class="hs-identifier hs-var hs-var">fixities</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((OccName, Fixity) -&gt; (OccName, Fixity) -&gt; Ordering)
-&gt; [(OccName, Fixity)] -&gt; [(OccName, Fixity)]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((OccName, Fixity) -&gt; OccName)
-&gt; (OccName, Fixity) -&gt; (OccName, Fixity) -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">(OccName, Fixity) -&gt; OccName
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681176542"><span class="hs-identifier hs-var">occ</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681176541"><span class="hs-identifier hs-var">fix</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#FixItem"><span class="hs-identifier hs-type">FixItem</span></a></span><span> </span><span id="local-6989586621681176542"><span class="annot"><span class="annottext">OccName
</span><a href="#local-6989586621681176542"><span class="hs-identifier hs-var">occ</span></a></span></span><span> </span><span id="local-6989586621681176541"><span class="annot"><span class="annottext">Fixity
</span><a href="#local-6989586621681176541"><span class="hs-identifier hs-var">fix</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FixityEnv -&gt; [FixItem]
forall a. NameEnv a -&gt; [a]
</span><a href="GHC.Types.Name.Env.html#nameEnvElts"><span class="hs-identifier hs-var">nameEnvElts</span></a></span><span> </span><span class="annot"><span class="annottext">FixityEnv
</span><a href="#local-6989586621681176585"><span class="hs-identifier hs-var">fix_env</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-243"></span><span>          </span><span class="hs-comment">-- The order of fixities returned from nameEnvElts is not</span><span>
</span><span id="line-244"></span><span>          </span><span class="hs-comment">-- deterministic, so we sort by OccName to canonicalize it.</span><span>
</span><span id="line-245"></span><span>          </span><span class="hs-comment">-- See Note [Deterministic UniqFM] in GHC.Types.Unique.DFM for more details.</span><span>
</span><span id="line-246"></span><span>        </span><span id="local-6989586621681176538"><span class="annot"><span class="annottext">warns :: Warnings
</span><a href="#local-6989586621681176538"><span class="hs-identifier hs-var hs-var">warns</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Warnings
</span><a href="#local-6989586621681176584"><span class="hs-identifier hs-var">src_warns</span></a></span><span>
</span><span id="line-247"></span><span>        </span><span id="local-6989586621681176537"><span class="annot"><span class="annottext">iface_rules :: [IfaceRule]
</span><a href="#local-6989586621681176537"><span class="hs-identifier hs-var hs-var">iface_rules</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreRule -&gt; IfaceRule) -&gt; [CoreRule] -&gt; [IfaceRule]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CoreRule -&gt; IfaceRule
</span><a href="GHC.Iface.Make.html#coreRuleToIfaceRule"><span class="hs-identifier hs-var">coreRuleToIfaceRule</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreRule]
</span><a href="#local-6989586621681176570"><span class="hs-identifier hs-var">rules</span></a></span><span>
</span><span id="line-248"></span><span>        </span><span id="local-6989586621681176535"><span class="annot"><span class="annottext">iface_insts :: [IfaceClsInst]
</span><a href="#local-6989586621681176535"><span class="hs-identifier hs-var hs-var">iface_insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ClsInst -&gt; IfaceClsInst) -&gt; [ClsInst] -&gt; [IfaceClsInst]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ClsInst -&gt; IfaceClsInst
</span><a href="GHC.Iface.Make.html#instanceToIfaceInst"><span class="hs-identifier hs-var">instanceToIfaceInst</span></a></span><span> </span><span class="annot"><span class="annottext">([ClsInst] -&gt; [IfaceClsInst]) -&gt; [ClsInst] -&gt; [IfaceClsInst]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">SafeHaskellMode -&gt; [ClsInst] -&gt; [ClsInst]
</span><a href="GHC.Tc.Utils.Monad.html#fixSafeInstances"><span class="hs-identifier hs-var">fixSafeInstances</span></a></span><span> </span><span class="annot"><span class="annottext">SafeHaskellMode
</span><a href="#local-6989586621681176581"><span class="hs-identifier hs-var">safe_mode</span></a></span><span> </span><span class="annot"><span class="annottext">[ClsInst]
</span><a href="#local-6989586621681176574"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-249"></span><span>        </span><span id="local-6989586621681176532"><span class="annot"><span class="annottext">iface_fam_insts :: [IfaceFamInst]
</span><a href="#local-6989586621681176532"><span class="hs-identifier hs-var hs-var">iface_fam_insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FamInst -&gt; IfaceFamInst) -&gt; [FamInst] -&gt; [IfaceFamInst]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FamInst -&gt; IfaceFamInst
</span><a href="GHC.Iface.Make.html#famInstToIfaceFamInst"><span class="hs-identifier hs-var">famInstToIfaceFamInst</span></a></span><span> </span><span class="annot"><span class="annottext">[FamInst]
</span><a href="#local-6989586621681176572"><span class="hs-identifier hs-var">fam_insts</span></a></span><span>
</span><span id="line-250"></span><span>        </span><span id="local-6989586621681176530"><span class="annot"><span class="annottext">trust_info :: IfaceTrustInfo
</span><a href="#local-6989586621681176530"><span class="hs-identifier hs-var hs-var">trust_info</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SafeHaskellMode -&gt; IfaceTrustInfo
</span><a href="GHC.Driver.Types.html#setSafeMode"><span class="hs-identifier hs-var">setSafeMode</span></a></span><span> </span><span class="annot"><span class="annottext">SafeHaskellMode
</span><a href="#local-6989586621681176581"><span class="hs-identifier hs-var">safe_mode</span></a></span><span>
</span><span id="line-251"></span><span>        </span><span id="local-6989586621681176528"><span class="annot"><span class="annottext">annotations :: [IfaceAnnotation]
</span><a href="#local-6989586621681176528"><span class="hs-identifier hs-var hs-var">annotations</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Annotation -&gt; IfaceAnnotation)
-&gt; [Annotation] -&gt; [IfaceAnnotation]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Annotation -&gt; IfaceAnnotation
</span><a href="GHC.Iface.Make.html#mkIfaceAnnotation"><span class="hs-identifier hs-var">mkIfaceAnnotation</span></a></span><span> </span><span class="annot"><span class="annottext">[Annotation]
</span><a href="#local-6989586621681176568"><span class="hs-identifier hs-var">anns</span></a></span><span>
</span><span id="line-252"></span><span>        </span><span id="local-6989586621681176526"><span class="annot"><span class="annottext">icomplete_sigs :: [IfaceCompleteMatch]
</span><a href="#local-6989586621681176526"><span class="hs-identifier hs-var hs-var">icomplete_sigs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CompleteMatch -&gt; IfaceCompleteMatch)
-&gt; [CompleteMatch] -&gt; [IfaceCompleteMatch]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CompleteMatch -&gt; IfaceCompleteMatch
</span><a href="GHC.Iface.Make.html#mkIfaceCompleteSig"><span class="hs-identifier hs-var">mkIfaceCompleteSig</span></a></span><span> </span><span class="annot"><span class="annottext">[CompleteMatch]
</span><a href="#local-6989586621681176562"><span class="hs-identifier hs-var">complete_sigs</span></a></span><span>
</span><span id="line-253"></span><span>
</span><span id="line-254"></span><span>    </span><span class="annot"><span class="annottext">ModIface :: forall (phase :: ModIfacePhase).
Module
-&gt; Maybe Module
-&gt; HscSource
-&gt; Dependencies
-&gt; [Usage]
-&gt; [AvailInfo]
-&gt; Bool
-&gt; [(OccName, Fixity)]
-&gt; Warnings
-&gt; [IfaceAnnotation]
-&gt; [IfaceDeclExts phase]
-&gt; Maybe GlobalRdrEnv
-&gt; [IfaceClsInst]
-&gt; [IfaceFamInst]
-&gt; [IfaceRule]
-&gt; Bool
-&gt; IfaceTrustInfo
-&gt; Bool
-&gt; [IfaceCompleteMatch]
-&gt; Maybe HsDocString
-&gt; DeclDocMap
-&gt; ArgDocMap
-&gt; IfaceBackendExts phase
-&gt; ExtensibleFields
-&gt; ModIface_ phase
</span><a href="GHC.Driver.Types.html#ModIface"><span class="hs-identifier hs-type">ModIface</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-255"></span><span>          </span><span class="annot"><span class="annottext">mi_module :: Module
</span><a href="GHC.Driver.Types.html#mi_module"><span class="hs-identifier hs-var">mi_module</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176590"><span class="hs-identifier hs-var">this_mod</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-256"></span><span>          </span><span class="hs-comment">-- Need to record this because it depends on the -instantiated-with flag</span><span>
</span><span id="line-257"></span><span>          </span><span class="hs-comment">-- which could change</span><span>
</span><span id="line-258"></span><span>          </span><span class="annot"><span class="annottext">mi_sig_of :: Maybe Module
</span><a href="GHC.Driver.Types.html#mi_sig_of"><span class="hs-identifier hs-var">mi_sig_of</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176561"><span class="hs-identifier hs-var">semantic_mod</span></a></span><span> </span><span class="annot"><span class="annottext">Module -&gt; Module -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176590"><span class="hs-identifier hs-var">this_mod</span></a></span><span>
</span><span id="line-259"></span><span>                            </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe Module
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-260"></span><span>                            </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Maybe Module
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176561"><span class="hs-identifier hs-var">semantic_mod</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-261"></span><span>          </span><span class="annot"><span class="annottext">mi_hsc_src :: HscSource
</span><a href="GHC.Driver.Types.html#mi_hsc_src"><span class="hs-identifier hs-var">mi_hsc_src</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscSource
</span><a href="#local-6989586621681176589"><span class="hs-identifier hs-var">hsc_src</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-262"></span><span>          </span><span class="annot"><span class="annottext">mi_deps :: Dependencies
</span><a href="GHC.Driver.Types.html#mi_deps"><span class="hs-identifier hs-var">mi_deps</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Dependencies
</span><a href="#local-6989586621681176587"><span class="hs-identifier hs-var">deps</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-263"></span><span>          </span><span class="annot"><span class="annottext">mi_usages :: [Usage]
</span><a href="GHC.Driver.Types.html#mi_usages"><span class="hs-identifier hs-var">mi_usages</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Usage]
</span><a href="#local-6989586621681176580"><span class="hs-identifier hs-var">usages</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-264"></span><span>          </span><span class="annot"><span class="annottext">mi_exports :: [AvailInfo]
</span><a href="GHC.Driver.Types.html#mi_exports"><span class="hs-identifier hs-var">mi_exports</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[AvailInfo] -&gt; [AvailInfo]
</span><a href="GHC.Iface.Make.html#mkIfaceExports"><span class="hs-identifier hs-var">mkIfaceExports</span></a></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621681176564"><span class="hs-identifier hs-var">exports</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span>          </span><span class="hs-comment">-- Sort these lexicographically, so that</span><span>
</span><span id="line-267"></span><span>          </span><span class="hs-comment">-- the result is stable across compilations</span><span>
</span><span id="line-268"></span><span>          </span><span class="annot"><span class="annottext">mi_insts :: [IfaceClsInst]
</span><a href="GHC.Driver.Types.html#mi_insts"><span class="hs-identifier hs-var">mi_insts</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; IfaceClsInst -&gt; Ordering)
-&gt; [IfaceClsInst] -&gt; [IfaceClsInst]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; IfaceClsInst -&gt; Ordering
</span><a href="#local-6989586621681176517"><span class="hs-identifier hs-var">cmp_inst</span></a></span><span>     </span><span class="annot"><span class="annottext">[IfaceClsInst]
</span><a href="#local-6989586621681176535"><span class="hs-identifier hs-var">iface_insts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-269"></span><span>          </span><span class="annot"><span class="annottext">mi_fam_insts :: [IfaceFamInst]
</span><a href="GHC.Driver.Types.html#mi_fam_insts"><span class="hs-identifier hs-var">mi_fam_insts</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceFamInst -&gt; IfaceFamInst -&gt; Ordering)
-&gt; [IfaceFamInst] -&gt; [IfaceFamInst]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; IfaceFamInst -&gt; Ordering
</span><a href="#local-6989586621681176515"><span class="hs-identifier hs-var">cmp_fam_inst</span></a></span><span> </span><span class="annot"><span class="annottext">[IfaceFamInst]
</span><a href="#local-6989586621681176532"><span class="hs-identifier hs-var">iface_fam_insts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-270"></span><span>          </span><span class="annot"><span class="annottext">mi_rules :: [IfaceRule]
</span><a href="GHC.Driver.Types.html#mi_rules"><span class="hs-identifier hs-var">mi_rules</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceRule -&gt; IfaceRule -&gt; Ordering) -&gt; [IfaceRule] -&gt; [IfaceRule]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceRule -&gt; IfaceRule -&gt; Ordering
</span><a href="#local-6989586621681176513"><span class="hs-identifier hs-var">cmp_rule</span></a></span><span>     </span><span class="annot"><span class="annottext">[IfaceRule]
</span><a href="#local-6989586621681176537"><span class="hs-identifier hs-var">iface_rules</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span>          </span><span class="annot"><span class="annottext">mi_fixities :: [(OccName, Fixity)]
</span><a href="GHC.Driver.Types.html#mi_fixities"><span class="hs-identifier hs-var">mi_fixities</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(OccName, Fixity)]
</span><a href="#local-6989586621681176544"><span class="hs-identifier hs-var">fixities</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-273"></span><span>          </span><span class="annot"><span class="annottext">mi_warns :: Warnings
</span><a href="GHC.Driver.Types.html#mi_warns"><span class="hs-identifier hs-var">mi_warns</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Warnings
</span><a href="#local-6989586621681176538"><span class="hs-identifier hs-var">warns</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-274"></span><span>          </span><span class="annot"><span class="annottext">mi_anns :: [IfaceAnnotation]
</span><a href="GHC.Driver.Types.html#mi_anns"><span class="hs-identifier hs-var">mi_anns</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceAnnotation]
</span><a href="#local-6989586621681176528"><span class="hs-identifier hs-var">annotations</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-275"></span><span>          </span><span class="annot"><span class="annottext">mi_globals :: Maybe GlobalRdrEnv
</span><a href="GHC.Driver.Types.html#mi_globals"><span class="hs-identifier hs-var">mi_globals</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GlobalRdrEnv -&gt; Maybe GlobalRdrEnv
</span><a href="#local-6989586621681176508"><span class="hs-identifier hs-var">maybeGlobalRdrEnv</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176586"><span class="hs-identifier hs-var">rdr_env</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-276"></span><span>          </span><span class="annot"><span class="annottext">mi_used_th :: Bool
</span><a href="GHC.Driver.Types.html#mi_used_th"><span class="hs-identifier hs-var">mi_used_th</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176588"><span class="hs-identifier hs-var">used_th</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-277"></span><span>          </span><span class="annot"><span class="annottext">mi_decls :: [IfaceDeclExts 'ModIfaceCore]
</span><a href="GHC.Driver.Types.html#mi_decls"><span class="hs-identifier hs-var">mi_decls</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceDecl]
[IfaceDeclExts 'ModIfaceCore]
</span><a href="#local-6989586621681176556"><span class="hs-identifier hs-var">decls</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-278"></span><span>          </span><span class="annot"><span class="annottext">mi_hpc :: Bool
</span><a href="GHC.Driver.Types.html#mi_hpc"><span class="hs-identifier hs-var">mi_hpc</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HpcInfo -&gt; Bool
</span><a href="GHC.Driver.Types.html#isHpcUsed"><span class="hs-identifier hs-var">isHpcUsed</span></a></span><span> </span><span class="annot"><span class="annottext">HpcInfo
</span><a href="#local-6989586621681176583"><span class="hs-identifier hs-var">hpc_info</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-279"></span><span>          </span><span class="annot"><span class="annottext">mi_trust :: IfaceTrustInfo
</span><a href="GHC.Driver.Types.html#mi_trust"><span class="hs-identifier hs-var">mi_trust</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTrustInfo
</span><a href="#local-6989586621681176530"><span class="hs-identifier hs-var">trust_info</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-280"></span><span>          </span><span class="annot"><span class="annottext">mi_trust_pkg :: Bool
</span><a href="GHC.Driver.Types.html#mi_trust_pkg"><span class="hs-identifier hs-var">mi_trust_pkg</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176582"><span class="hs-identifier hs-var">pkg_trust_req</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-281"></span><span>          </span><span class="annot"><span class="annottext">mi_complete_sigs :: [IfaceCompleteMatch]
</span><a href="GHC.Driver.Types.html#mi_complete_sigs"><span class="hs-identifier hs-var">mi_complete_sigs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceCompleteMatch]
</span><a href="#local-6989586621681176526"><span class="hs-identifier hs-var">icomplete_sigs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-282"></span><span>          </span><span class="annot"><span class="annottext">mi_doc_hdr :: Maybe HsDocString
</span><a href="GHC.Driver.Types.html#mi_doc_hdr"><span class="hs-identifier hs-var">mi_doc_hdr</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe HsDocString
</span><a href="#local-6989586621681176579"><span class="hs-identifier hs-var">doc_hdr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-283"></span><span>          </span><span class="annot"><span class="annottext">mi_decl_docs :: DeclDocMap
</span><a href="GHC.Driver.Types.html#mi_decl_docs"><span class="hs-identifier hs-var">mi_decl_docs</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DeclDocMap
</span><a href="#local-6989586621681176578"><span class="hs-identifier hs-var">decl_docs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-284"></span><span>          </span><span class="annot"><span class="annottext">mi_arg_docs :: ArgDocMap
</span><a href="GHC.Driver.Types.html#mi_arg_docs"><span class="hs-identifier hs-var">mi_arg_docs</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ArgDocMap
</span><a href="#local-6989586621681176577"><span class="hs-identifier hs-var">arg_docs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-285"></span><span>          </span><span class="annot"><span class="annottext">mi_final_exts :: IfaceBackendExts 'ModIfaceCore
</span><a href="GHC.Driver.Types.html#mi_final_exts"><span class="hs-identifier hs-var">mi_final_exts</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-286"></span><span>          </span><span class="annot"><span class="annottext">mi_ext_fields :: ExtensibleFields
</span><a href="GHC.Driver.Types.html#mi_ext_fields"><span class="hs-identifier hs-var">mi_ext_fields</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ExtensibleFields
</span><a href="GHC.Driver.Types.html#emptyExtensibleFields"><span class="hs-identifier hs-var">emptyExtensibleFields</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-287"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-288"></span><span>     </span><span id="local-6989586621681176513"><span class="annot"><span class="annottext">cmp_rule :: IfaceRule -&gt; IfaceRule -&gt; Ordering
</span><a href="#local-6989586621681176513"><span class="hs-identifier hs-var hs-var">cmp_rule</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceRule -&gt; RuleName) -&gt; IfaceRule -&gt; IfaceRule -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceRule -&gt; RuleName
</span><a href="GHC.Iface.Syntax.html#ifRuleName"><span class="hs-identifier hs-var hs-var">ifRuleName</span></a></span><span>
</span><span id="line-289"></span><span>     </span><span class="hs-comment">-- Compare these lexicographically by OccName, *not* by unique,</span><span>
</span><span id="line-290"></span><span>     </span><span class="hs-comment">-- because the latter is not stable across compilations:</span><span>
</span><span id="line-291"></span><span>     </span><span id="local-6989586621681176517"><span class="annot"><span class="annottext">cmp_inst :: IfaceClsInst -&gt; IfaceClsInst -&gt; Ordering
</span><a href="#local-6989586621681176517"><span class="hs-identifier hs-var hs-var">cmp_inst</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceClsInst -&gt; OccName)
-&gt; IfaceClsInst -&gt; IfaceClsInst -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; OccName)
-&gt; (IfaceClsInst -&gt; Name) -&gt; IfaceClsInst -&gt; OccName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceClsInst -&gt; Name
</span><a href="GHC.Iface.Syntax.html#ifDFun"><span class="hs-identifier hs-var hs-var">ifDFun</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>     </span><span id="local-6989586621681176515"><span class="annot"><span class="annottext">cmp_fam_inst :: IfaceFamInst -&gt; IfaceFamInst -&gt; Ordering
</span><a href="#local-6989586621681176515"><span class="hs-identifier hs-var hs-var">cmp_fam_inst</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IfaceFamInst -&gt; OccName)
-&gt; IfaceFamInst -&gt; IfaceFamInst -&gt; Ordering
forall a b. Ord a =&gt; (b -&gt; a) -&gt; b -&gt; b -&gt; Ordering
</span><a href="../../base/src/Data.Ord.html#comparing"><span class="hs-identifier hs-var">comparing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; OccName)
-&gt; (IfaceFamInst -&gt; Name) -&gt; IfaceFamInst -&gt; OccName
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; Name
</span><a href="#local-6989586621681176487"><span class="hs-identifier hs-var">ifFamInstTcName</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-293"></span><span>
</span><span id="line-294"></span><span>     </span><span id="local-6989586621681176486"><span class="annot"><span class="annottext">dflags :: DynFlags
</span><a href="#local-6989586621681176486"><span class="hs-identifier hs-var hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HscEnv -&gt; DynFlags
</span><a href="GHC.Driver.Types.html#hsc_dflags"><span class="hs-identifier hs-var hs-var">hsc_dflags</span></a></span><span> </span><span class="annot"><span class="annottext">HscEnv
</span><a href="#local-6989586621681176591"><span class="hs-identifier hs-var">hsc_env</span></a></span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span>     </span><span class="hs-comment">-- We only fill in mi_globals if the module was compiled to byte</span><span>
</span><span id="line-297"></span><span>     </span><span class="hs-comment">-- code.  Otherwise, the compiler may not have retained all the</span><span>
</span><span id="line-298"></span><span>     </span><span class="hs-comment">-- top-level bindings and they won't be in the TypeEnv (see</span><span>
</span><span id="line-299"></span><span>     </span><span class="hs-comment">-- Desugar.addExportFlagsAndRules).  The mi_globals field is used</span><span>
</span><span id="line-300"></span><span>     </span><span class="hs-comment">-- by GHCi to decide whether the module has its full top-level</span><span>
</span><span id="line-301"></span><span>     </span><span class="hs-comment">-- scope available. (#5534)</span><span>
</span><span id="line-302"></span><span>     </span><span class="annot"><a href="#local-6989586621681176508"><span class="hs-identifier hs-type">maybeGlobalRdrEnv</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#GlobalRdrEnv"><span class="hs-identifier hs-type">GlobalRdrEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Name.Reader.html#GlobalRdrEnv"><span class="hs-identifier hs-type">GlobalRdrEnv</span></a></span><span>
</span><span id="line-303"></span><span>     </span><span id="local-6989586621681176508"><span class="annot"><span class="annottext">maybeGlobalRdrEnv :: GlobalRdrEnv -&gt; Maybe GlobalRdrEnv
</span><a href="#local-6989586621681176508"><span class="hs-identifier hs-var hs-var">maybeGlobalRdrEnv</span></a></span></span><span> </span><span id="local-6989586621681176485"><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176485"><span class="hs-identifier hs-var">rdr_env</span></a></span></span><span>
</span><span id="line-304"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HscTarget -&gt; Bool
</span><a href="GHC.Driver.Session.html#targetRetainsAllBindings"><span class="hs-identifier hs-var">targetRetainsAllBindings</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; HscTarget
</span><a href="GHC.Driver.Session.html#hscTarget"><span class="hs-identifier hs-var hs-var">hscTarget</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681176486"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GlobalRdrEnv -&gt; Maybe GlobalRdrEnv
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">GlobalRdrEnv
</span><a href="#local-6989586621681176485"><span class="hs-identifier hs-var">rdr_env</span></a></span><span>
</span><span id="line-305"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe GlobalRdrEnv
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span>     </span><span id="local-6989586621681176487"><span class="annot"><span class="annottext">ifFamInstTcName :: IfaceFamInst -&gt; Name
</span><a href="#local-6989586621681176487"><span class="hs-identifier hs-var hs-var">ifFamInstTcName</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceFamInst -&gt; Name
</span><a href="GHC.Iface.Syntax.html#ifFamInstFam"><span class="hs-identifier hs-var hs-var">ifFamInstFam</span></a></span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span>
</span><span id="line-310"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
       COMPLETE Pragmas
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span class="annot"><a href="GHC.Iface.Make.html#mkIfaceCompleteSig"><span class="hs-identifier hs-type">mkIfaceCompleteSig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#CompleteMatch"><span class="hs-identifier hs-type">CompleteMatch</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceCompleteMatch"><span class="hs-identifier hs-type">IfaceCompleteMatch</span></a></span><span>
</span><span id="line-319"></span><span id="mkIfaceCompleteSig"><span class="annot"><span class="annottext">mkIfaceCompleteSig :: CompleteMatch -&gt; IfaceCompleteMatch
</span><a href="GHC.Iface.Make.html#mkIfaceCompleteSig"><span class="hs-identifier hs-var hs-var">mkIfaceCompleteSig</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#CompleteMatch"><span class="hs-identifier hs-type">CompleteMatch</span></a></span><span> </span><span id="local-6989586621681176480"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681176480"><span class="hs-identifier hs-var">cls</span></a></span></span><span> </span><span id="local-6989586621681176479"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176479"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Name] -&gt; Name -&gt; IfaceCompleteMatch
</span><a href="GHC.Iface.Syntax.html#IfaceCompleteMatch"><span class="hs-identifier hs-var">IfaceCompleteMatch</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681176480"><span class="hs-identifier hs-var">cls</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176479"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span>
</span><span id="line-322"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
       Keeping track of what we've slurped, and fingerprints
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span>
</span><span id="line-331"></span><span class="annot"><a href="GHC.Iface.Make.html#mkIfaceAnnotation"><span class="hs-identifier hs-type">mkIfaceAnnotation</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Annotations.html#Annotation"><span class="hs-identifier hs-type">Annotation</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAnnotation"><span class="hs-identifier hs-type">IfaceAnnotation</span></a></span><span>
</span><span id="line-332"></span><span id="mkIfaceAnnotation"><span class="annot"><span class="annottext">mkIfaceAnnotation :: Annotation -&gt; IfaceAnnotation
</span><a href="GHC.Iface.Make.html#mkIfaceAnnotation"><span class="hs-identifier hs-var hs-var">mkIfaceAnnotation</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Annotations.html#Annotation"><span class="hs-identifier hs-type">Annotation</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ann_target :: Annotation -&gt; CoreAnnTarget
</span><a href="GHC.Types.Annotations.html#ann_target"><span class="hs-identifier hs-var">ann_target</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176475"><span class="annot"><span class="annottext">CoreAnnTarget
</span><a href="#local-6989586621681176475"><span class="hs-identifier hs-var">target</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ann_value :: Annotation -&gt; AnnPayload
</span><a href="GHC.Types.Annotations.html#ann_value"><span class="hs-identifier hs-var">ann_value</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176473"><span class="annot"><span class="annottext">AnnPayload
</span><a href="#local-6989586621681176473"><span class="hs-identifier hs-var">payload</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-333"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceAnnotation :: IfaceAnnTarget -&gt; AnnPayload -&gt; IfaceAnnotation
</span><a href="GHC.Iface.Syntax.html#IfaceAnnotation"><span class="hs-identifier hs-type">IfaceAnnotation</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-334"></span><span>        </span><span class="annot"><span class="annottext">ifAnnotatedTarget :: IfaceAnnTarget
</span><a href="GHC.Iface.Syntax.html#ifAnnotatedTarget"><span class="hs-identifier hs-var">ifAnnotatedTarget</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; OccName) -&gt; CoreAnnTarget -&gt; IfaceAnnTarget
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">CoreAnnTarget
</span><a href="#local-6989586621681176475"><span class="hs-identifier hs-var">target</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-335"></span><span>        </span><span class="annot"><span class="annottext">ifAnnotatedValue :: AnnPayload
</span><a href="GHC.Iface.Syntax.html#ifAnnotatedValue"><span class="hs-identifier hs-var">ifAnnotatedValue</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnnPayload
</span><a href="#local-6989586621681176473"><span class="hs-identifier hs-var">payload</span></a></span><span>
</span><span id="line-336"></span><span>    </span><span class="hs-special">}</span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="annot"><a href="GHC.Iface.Make.html#mkIfaceExports"><span class="hs-identifier hs-type">mkIfaceExports</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Driver.Types.html#IfaceExport"><span class="hs-identifier hs-type">IfaceExport</span></a></span><span class="hs-special">]</span><span>  </span><span class="hs-comment">-- Sort to make canonical</span><span>
</span><span id="line-339"></span><span id="mkIfaceExports"><span class="annot"><span class="annottext">mkIfaceExports :: [AvailInfo] -&gt; [AvailInfo]
</span><a href="GHC.Iface.Make.html#mkIfaceExports"><span class="hs-identifier hs-var hs-var">mkIfaceExports</span></a></span></span><span> </span><span id="local-6989586621681176468"><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621681176468"><span class="hs-identifier hs-var">exports</span></a></span></span><span>
</span><span id="line-340"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AvailInfo -&gt; AvailInfo -&gt; Ordering) -&gt; [AvailInfo] -&gt; [AvailInfo]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; AvailInfo -&gt; Ordering
</span><a href="GHC.Types.Avail.html#stableAvailCmp"><span class="hs-identifier hs-var">stableAvailCmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(AvailInfo -&gt; AvailInfo) -&gt; [AvailInfo] -&gt; [AvailInfo]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">AvailInfo -&gt; AvailInfo
</span><a href="#local-6989586621681176466"><span class="hs-identifier hs-var">sort_subs</span></a></span><span> </span><span class="annot"><span class="annottext">[AvailInfo]
</span><a href="#local-6989586621681176468"><span class="hs-identifier hs-var">exports</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-341"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-342"></span><span>    </span><span class="annot"><a href="#local-6989586621681176466"><span class="hs-identifier hs-type">sort_subs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Avail.html#AvailInfo"><span class="hs-identifier hs-type">AvailInfo</span></a></span><span>
</span><span id="line-343"></span><span>    </span><span id="local-6989586621681176466"><span class="annot"><span class="annottext">sort_subs :: AvailInfo -&gt; AvailInfo
</span><a href="#local-6989586621681176466"><span class="hs-identifier hs-var hs-var">sort_subs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-type">Avail</span></a></span><span> </span><span id="local-6989586621681176464"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176464"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#Avail"><span class="hs-identifier hs-var">Avail</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176464"><span class="hs-identifier hs-var">n</span></a></span><span>
</span><span id="line-344"></span><span>    </span><span class="annot"><a href="#local-6989586621681176466"><span class="hs-identifier hs-var">sort_subs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621681176462"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176462"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621681176461"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681176461"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176462"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel]
</span><a href="#local-6989586621681176460"><span class="hs-identifier hs-var">sort_flds</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681176461"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-345"></span><span>    </span><span class="annot"><a href="#local-6989586621681176466"><span class="hs-identifier hs-var">sort_subs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-type">AvailTC</span></a></span><span> </span><span id="local-6989586621681176459"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176459"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681176458"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176458"><span class="hs-identifier hs-var">m</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681176457"><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681176457"><span class="hs-identifier hs-var">ms</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681176456"><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681176456"><span class="hs-identifier hs-var">fs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-346"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176459"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176458"><span class="hs-identifier hs-var">m</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176459"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176458"><span class="hs-identifier hs-var">m</span></a></span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">(Name -&gt; Name -&gt; Ordering) -&gt; [Name] -&gt; [Name]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier hs-var">stableNameCmp</span></a></span><span> </span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681176457"><span class="hs-identifier hs-var">ms</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel]
</span><a href="#local-6989586621681176460"><span class="hs-identifier hs-var">sort_flds</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681176456"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-347"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [FieldLabel] -&gt; AvailInfo
</span><a href="GHC.Types.Avail.html#AvailTC"><span class="hs-identifier hs-var">AvailTC</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176459"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name -&gt; Name -&gt; Ordering) -&gt; [Name] -&gt; [Name]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier hs-var">stableNameCmp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176458"><span class="hs-identifier hs-var">m</span></a></span><span class="annot"><span class="annottext">Name -&gt; [Name] -&gt; [Name]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[Name]
</span><a href="#local-6989586621681176457"><span class="hs-identifier hs-var">ms</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FieldLabel] -&gt; [FieldLabel]
</span><a href="#local-6989586621681176460"><span class="hs-identifier hs-var">sort_flds</span></a></span><span> </span><span class="annot"><span class="annottext">[FieldLabel]
</span><a href="#local-6989586621681176456"><span class="hs-identifier hs-var">fs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-348"></span><span>       </span><span class="hs-comment">-- Maintain the AvailTC Invariant</span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span>    </span><span id="local-6989586621681176460"><span class="annot"><span class="annottext">sort_flds :: [FieldLabel] -&gt; [FieldLabel]
</span><a href="#local-6989586621681176460"><span class="hs-identifier hs-var hs-var">sort_flds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FieldLabel -&gt; FieldLabel -&gt; Ordering)
-&gt; [FieldLabel] -&gt; [FieldLabel]
forall a. (a -&gt; a -&gt; Ordering) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sortBy"><span class="hs-identifier hs-var">sortBy</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; Name -&gt; Ordering
</span><a href="GHC.Types.Name.html#stableNameCmp"><span class="hs-identifier hs-var">stableNameCmp</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Name -&gt; Ordering)
-&gt; (FieldLabel -&gt; Name) -&gt; FieldLabel -&gt; FieldLabel -&gt; Ordering
forall b c a. (b -&gt; b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; a -&gt; c
</span><a href="../../base/src/Data.Function.html#on"><span class="hs-operator hs-var">`on`</span></a></span><span> </span><span class="annot"><span class="annottext">FieldLabel -&gt; Name
forall a. FieldLbl a -&gt; a
</span><a href="GHC.Types.FieldLabel.html#flSelector"><span class="hs-identifier hs-var hs-var">flSelector</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-351"></span><span>
</span><span id="line-352"></span><span class="hs-comment">{-
Note [Original module]
~~~~~~~~~~~~~~~~~~~~~
Consider this:
        module X where { data family T }
        module Y( T(..) ) where { import X; data instance T Int = MkT Int }
The exported Avail from Y will look like
        X.T{X.T, Y.MkT}
That is, in Y,
  - only MkT is brought into scope by the data instance;
  - but the parent (used for grouping and naming in T(..) exports) is X.T
  - and in this case we export X.T too

In the result of mkIfaceExports, the names are grouped by defining module,
so we may need to split up a single Avail into multiple ones.
-}</span><span>
</span><span id="line-368"></span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
                Converting things to their Iface equivalents
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-377"></span><span>
</span><span id="line-378"></span><span class="annot"><a href="GHC.Iface.Make.html#tyThingToIfaceDecl"><span class="hs-identifier hs-type">tyThingToIfaceDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#TyThing"><span class="hs-identifier hs-type">TyThing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span>
</span><span id="line-379"></span><span id="tyThingToIfaceDecl"><span class="annot"><span class="annottext">tyThingToIfaceDecl :: DynFlags -&gt; TyThing -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#tyThingToIfaceDecl"><span class="hs-identifier hs-var hs-var">tyThingToIfaceDecl</span></a></span></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AnId"><span class="hs-identifier hs-type">AnId</span></a></span><span> </span><span id="local-6989586621681176451"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176451"><span class="hs-identifier hs-var">id</span></a></span></span><span class="hs-special">)</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#idToIfaceDecl"><span class="hs-identifier hs-var">idToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176451"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-380"></span><span class="annot"><a href="GHC.Iface.Make.html#tyThingToIfaceDecl"><span class="hs-identifier hs-var">tyThingToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ATyCon"><span class="hs-identifier hs-type">ATyCon</span></a></span><span> </span><span id="local-6989586621681176448"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176448"><span class="hs-identifier hs-var">tycon</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TidyEnv, IfaceDecl) -&gt; IfaceDecl
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; TyCon -&gt; (TidyEnv, IfaceDecl)
</span><a href="GHC.Iface.Make.html#tyConToIfaceDecl"><span class="hs-identifier hs-var">tyConToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="GHC.Types.Var.Env.html#emptyTidyEnv"><span class="hs-identifier hs-var">emptyTidyEnv</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176448"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-381"></span><span class="annot"><a href="GHC.Iface.Make.html#tyThingToIfaceDecl"><span class="hs-identifier hs-var">tyThingToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#ACoAxiom"><span class="hs-identifier hs-type">ACoAxiom</span></a></span><span> </span><span id="local-6989586621681176444"><span class="annot"><span class="annottext">CoAxiom Branched
</span><a href="#local-6989586621681176444"><span class="hs-identifier hs-var">ax</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched -&gt; IfaceDecl
forall (br :: BranchFlag). CoAxiom br -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#coAxiomToIfaceDecl"><span class="hs-identifier hs-var">coAxiomToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched
</span><a href="#local-6989586621681176444"><span class="hs-identifier hs-var">ax</span></a></span><span>
</span><span id="line-382"></span><span class="annot"><a href="GHC.Iface.Make.html#tyThingToIfaceDecl"><span class="hs-identifier hs-var">tyThingToIfaceDecl</span></a></span><span> </span><span id="local-6989586621681176443"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681176443"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#AConLike"><span class="hs-identifier hs-type">AConLike</span></a></span><span> </span><span id="local-6989586621681176441"><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681176441"><span class="hs-identifier hs-var">cl</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ConLike
</span><a href="#local-6989586621681176441"><span class="hs-identifier hs-var">cl</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-383"></span><span>    </span><span class="annot"><a href="GHC.Core.ConLike.html#RealDataCon"><span class="hs-identifier hs-type">RealDataCon</span></a></span><span> </span><span id="local-6989586621681176439"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176439"><span class="hs-identifier hs-var">dc</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; DataCon -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#dataConToIfaceDecl"><span class="hs-identifier hs-var">dataConToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681176443"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176439"><span class="hs-identifier hs-var">dc</span></a></span><span> </span><span class="hs-comment">-- for ppr purposes only</span><span>
</span><span id="line-384"></span><span>    </span><span class="annot"><a href="GHC.Core.ConLike.html#PatSynCon"><span class="hs-identifier hs-type">PatSynCon</span></a></span><span> </span><span id="local-6989586621681176436"><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681176436"><span class="hs-identifier hs-var">ps</span></a></span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PatSyn -&gt; IfaceDecl
</span><a href="GHC.CoreToIface.html#patSynToIfaceDecl"><span class="hs-identifier hs-var">patSynToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">PatSyn
</span><a href="#local-6989586621681176436"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-385"></span><span>
</span><span id="line-386"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-387"></span><span class="annot"><a href="GHC.Iface.Make.html#idToIfaceDecl"><span class="hs-identifier hs-type">idToIfaceDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span>
</span><span id="line-388"></span><span class="hs-comment">-- The Id is already tidied, so that locally-bound names</span><span>
</span><span id="line-389"></span><span class="hs-comment">-- (lambdas, for-alls) already have non-clashing OccNames</span><span>
</span><span id="line-390"></span><span class="hs-comment">-- We can't tidy it here, locally, because it may have</span><span>
</span><span id="line-391"></span><span class="hs-comment">-- free variables in its type or IdInfo</span><span>
</span><span id="line-392"></span><span id="idToIfaceDecl"><span class="annot"><span class="annottext">idToIfaceDecl :: Id -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#idToIfaceDecl"><span class="hs-identifier hs-var hs-var">idToIfaceDecl</span></a></span></span><span> </span><span id="local-6989586621681176434"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176434"><span class="hs-identifier hs-var">id</span></a></span></span><span>
</span><span id="line-393"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceId :: Name -&gt; IfaceType -&gt; IfaceIdDetails -&gt; IfaceIdInfo -&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceId"><span class="hs-identifier hs-type">IfaceId</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176434"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-394"></span><span>              </span><span class="annot"><span class="annottext">ifType :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifType"><span class="hs-identifier hs-var">ifType</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#toIfaceType"><span class="hs-identifier hs-var">toIfaceType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176434"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-395"></span><span>              </span><span class="annot"><span class="annottext">ifIdDetails :: IfaceIdDetails
</span><a href="GHC.Iface.Syntax.html#ifIdDetails"><span class="hs-identifier hs-var">ifIdDetails</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdDetails -&gt; IfaceIdDetails
</span><a href="GHC.CoreToIface.html#toIfaceIdDetails"><span class="hs-identifier hs-var">toIfaceIdDetails</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; IdDetails
</span><a href="GHC.Types.Var.html#idDetails"><span class="hs-identifier hs-var">idDetails</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176434"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-396"></span><span>              </span><span class="annot"><span class="annottext">ifIdInfo :: IfaceIdInfo
</span><a href="GHC.Iface.Syntax.html#ifIdInfo"><span class="hs-identifier hs-var">ifIdInfo</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IdInfo -&gt; IfaceIdInfo
</span><a href="GHC.CoreToIface.html#toIfaceIdInfo"><span class="hs-identifier hs-var">toIfaceIdInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Id -&gt; IdInfo
Id -&gt; IdInfo
</span><a href="GHC.Types.Var.html#idInfo"><span class="hs-identifier hs-var">idInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176434"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-399"></span><span class="annot"><a href="GHC.Iface.Make.html#dataConToIfaceDecl"><span class="hs-identifier hs-type">dataConToIfaceDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.DataCon.html#DataCon"><span class="hs-identifier hs-type">DataCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span>
</span><span id="line-400"></span><span id="dataConToIfaceDecl"><span class="annot"><span class="annottext">dataConToIfaceDecl :: DynFlags -&gt; DataCon -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#dataConToIfaceDecl"><span class="hs-identifier hs-var hs-var">dataConToIfaceDecl</span></a></span></span><span> </span><span id="local-6989586621681176423"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681176423"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681176422"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176422"><span class="hs-identifier hs-var">dataCon</span></a></span></span><span>
</span><span id="line-401"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceId :: Name -&gt; IfaceType -&gt; IfaceIdDetails -&gt; IfaceIdInfo -&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceId"><span class="hs-identifier hs-type">IfaceId</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176422"><span class="hs-identifier hs-var">dataCon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-402"></span><span>              </span><span class="annot"><span class="annottext">ifType :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifType"><span class="hs-identifier hs-var">ifType</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#toIfaceType"><span class="hs-identifier hs-var">toIfaceType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; DataCon -&gt; Type
</span><a href="GHC.Core.DataCon.html#dataConDisplayType"><span class="hs-identifier hs-var">dataConDisplayType</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681176423"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176422"><span class="hs-identifier hs-var">dataCon</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-403"></span><span>              </span><span class="annot"><span class="annottext">ifIdDetails :: IfaceIdDetails
</span><a href="GHC.Iface.Syntax.html#ifIdDetails"><span class="hs-identifier hs-var">ifIdDetails</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceIdDetails
</span><a href="GHC.Iface.Syntax.html#IfVanillaId"><span class="hs-identifier hs-var">IfVanillaId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-404"></span><span>              </span><span class="annot"><span class="annottext">ifIdInfo :: IfaceIdInfo
</span><a href="GHC.Iface.Syntax.html#ifIdInfo"><span class="hs-identifier hs-var">ifIdInfo</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-405"></span><span>
</span><span id="line-406"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-407"></span><span id="local-6989586621681176856"><span class="annot"><a href="GHC.Iface.Make.html#coAxiomToIfaceDecl"><span class="hs-identifier hs-type">coAxiomToIfaceDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxiom"><span class="hs-identifier hs-type">CoAxiom</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681176856"><span class="hs-identifier hs-type">br</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span></span><span>
</span><span id="line-408"></span><span class="hs-comment">-- We *do* tidy Axioms, because they are not (and cannot</span><span>
</span><span id="line-409"></span><span class="hs-comment">-- conveniently be) built in tidy form</span><span>
</span><span id="line-410"></span><span id="coAxiomToIfaceDecl"><span class="annot"><span class="annottext">coAxiomToIfaceDecl :: forall (br :: BranchFlag). CoAxiom br -&gt; IfaceDecl
</span><a href="GHC.Iface.Make.html#coAxiomToIfaceDecl"><span class="hs-identifier hs-var hs-var">coAxiomToIfaceDecl</span></a></span></span><span> </span><span id="local-6989586621681176417"><span class="annot"><span class="annottext">ax :: CoAxiom br
</span><a href="#local-6989586621681176417"><span class="hs-identifier hs-var">ax</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxiom"><span class="hs-identifier hs-type">CoAxiom</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">co_ax_tc :: forall (br :: BranchFlag). CoAxiom br -&gt; TyCon
</span><a href="GHC.Core.Coercion.Axiom.html#co_ax_tc"><span class="hs-identifier hs-var">co_ax_tc</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176414"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176414"><span class="hs-identifier hs-var">tycon</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">co_ax_branches :: forall (br :: BranchFlag). CoAxiom br -&gt; Branches br
</span><a href="GHC.Core.Coercion.Axiom.html#co_ax_branches"><span class="hs-identifier hs-var">co_ax_branches</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176412"><span class="annot"><span class="annottext">Branches br
</span><a href="#local-6989586621681176412"><span class="hs-identifier hs-var">branches</span></a></span></span><span>
</span><span id="line-411"></span><span>                               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">co_ax_role :: forall (br :: BranchFlag). CoAxiom br -&gt; Role
</span><a href="GHC.Core.Coercion.Axiom.html#co_ax_role"><span class="hs-identifier hs-var">co_ax_role</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176410"><span class="annot"><span class="annottext">Role
</span><a href="#local-6989586621681176410"><span class="hs-keyword hs-var">role</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-412"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceAxiom :: Name -&gt; IfaceTyCon -&gt; Role -&gt; [IfaceAxBranch] -&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceAxiom"><span class="hs-identifier hs-type">IfaceAxiom</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoAxiom br -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom br
</span><a href="#local-6989586621681176417"><span class="hs-identifier hs-var">ax</span></a></span><span>
</span><span id="line-413"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifTyCon :: IfaceTyCon
</span><a href="GHC.Iface.Syntax.html#ifTyCon"><span class="hs-identifier hs-var">ifTyCon</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; IfaceTyCon
</span><a href="GHC.CoreToIface.html#toIfaceTyCon"><span class="hs-identifier hs-var">toIfaceTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176414"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-414"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifRole :: Role
</span><a href="GHC.Iface.Syntax.html#ifRole"><span class="hs-identifier hs-var">ifRole</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Role
</span><a href="#local-6989586621681176410"><span class="hs-keyword hs-var">role</span></a></span><span>
</span><span id="line-415"></span><span>              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifAxBranches :: [IfaceAxBranch]
</span><a href="GHC.Iface.Syntax.html#ifAxBranches"><span class="hs-identifier hs-var">ifAxBranches</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoAxBranch -&gt; IfaceAxBranch) -&gt; [CoAxBranch] -&gt; [IfaceAxBranch]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [[Type]] -&gt; CoAxBranch -&gt; IfaceAxBranch
</span><a href="GHC.Iface.Make.html#coAxBranchToIfaceBranch"><span class="hs-identifier hs-var">coAxBranchToIfaceBranch</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176414"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-416"></span><span>                                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(CoAxBranch -&gt; [Type]) -&gt; [CoAxBranch] -&gt; [[Type]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxBranch -&gt; [Type]
</span><a href="GHC.Core.Coercion.Axiom.html#coAxBranchLHS"><span class="hs-identifier hs-var">coAxBranchLHS</span></a></span><span> </span><span class="annot"><span class="annottext">[CoAxBranch]
</span><a href="#local-6989586621681176402"><span class="hs-identifier hs-var">branch_list</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-417"></span><span>                                   </span><span class="annot"><span class="annottext">[CoAxBranch]
</span><a href="#local-6989586621681176402"><span class="hs-identifier hs-var">branch_list</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-418"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-419"></span><span>   </span><span id="local-6989586621681176402"><span class="annot"><span class="annottext">branch_list :: [CoAxBranch]
</span><a href="#local-6989586621681176402"><span class="hs-identifier hs-var hs-var">branch_list</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Branches br -&gt; [CoAxBranch]
forall (br :: BranchFlag). Branches br -&gt; [CoAxBranch]
</span><a href="GHC.Core.Coercion.Axiom.html#fromBranches"><span class="hs-identifier hs-var">fromBranches</span></a></span><span> </span><span class="annot"><span class="annottext">Branches br
</span><a href="#local-6989586621681176412"><span class="hs-identifier hs-var">branches</span></a></span><span>
</span><span id="line-420"></span><span>
</span><span id="line-421"></span><span class="hs-comment">-- 2nd parameter is the list of branch LHSs, in case of a closed type family,</span><span>
</span><span id="line-422"></span><span class="hs-comment">-- for conversion from incompatible branches to incompatible indices.</span><span>
</span><span id="line-423"></span><span class="hs-comment">-- For an open type family the list should be empty.</span><span>
</span><span id="line-424"></span><span class="hs-comment">-- See Note [Storing compatibility] in GHC.Core.Coercion.Axiom</span><span>
</span><span id="line-425"></span><span class="annot"><a href="GHC.Iface.Make.html#coAxBranchToIfaceBranch"><span class="hs-identifier hs-type">coAxBranchToIfaceBranch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">]</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxBranch"><span class="hs-identifier hs-type">CoAxBranch</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAxBranch"><span class="hs-identifier hs-type">IfaceAxBranch</span></a></span><span>
</span><span id="line-426"></span><span id="coAxBranchToIfaceBranch"><span class="annot"><span class="annottext">coAxBranchToIfaceBranch :: TyCon -&gt; [[Type]] -&gt; CoAxBranch -&gt; IfaceAxBranch
</span><a href="GHC.Iface.Make.html#coAxBranchToIfaceBranch"><span class="hs-identifier hs-var hs-var">coAxBranchToIfaceBranch</span></a></span></span><span> </span><span id="local-6989586621681176400"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176400"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span id="local-6989586621681176399"><span class="annot"><span class="annottext">[[Type]]
</span><a href="#local-6989586621681176399"><span class="hs-identifier hs-var">lhs_s</span></a></span></span><span>
</span><span id="line-427"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Coercion.Axiom.html#CoAxBranch"><span class="hs-identifier hs-type">CoAxBranch</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cab_tvs :: CoAxBranch -&gt; [Id]
</span><a href="GHC.Core.Coercion.Axiom.html#cab_tvs"><span class="hs-identifier hs-var">cab_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176396"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176396"><span class="hs-identifier hs-var">tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cab_cvs :: CoAxBranch -&gt; [Id]
</span><a href="GHC.Core.Coercion.Axiom.html#cab_cvs"><span class="hs-identifier hs-var">cab_cvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176394"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176394"><span class="hs-identifier hs-var">cvs</span></a></span></span><span>
</span><span id="line-428"></span><span>                                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cab_eta_tvs :: CoAxBranch -&gt; [Id]
</span><a href="GHC.Core.Coercion.Axiom.html#cab_eta_tvs"><span class="hs-identifier hs-var">cab_eta_tvs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176392"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176392"><span class="hs-identifier hs-var">eta_tvs</span></a></span></span><span>
</span><span id="line-429"></span><span>                                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cab_lhs :: CoAxBranch -&gt; [Type]
</span><a href="GHC.Core.Coercion.Axiom.html#cab_lhs"><span class="hs-identifier hs-var">cab_lhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176390"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176390"><span class="hs-identifier hs-var">lhs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cab_roles :: CoAxBranch -&gt; [Role]
</span><a href="GHC.Core.Coercion.Axiom.html#cab_roles"><span class="hs-identifier hs-var">cab_roles</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176388"><span class="annot"><span class="annottext">[Role]
</span><a href="#local-6989586621681176388"><span class="hs-identifier hs-var">roles</span></a></span></span><span>
</span><span id="line-430"></span><span>                                    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cab_rhs :: CoAxBranch -&gt; Type
</span><a href="GHC.Core.Coercion.Axiom.html#cab_rhs"><span class="hs-identifier hs-var">cab_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176386"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176386"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">cab_incomps :: CoAxBranch -&gt; [CoAxBranch]
</span><a href="GHC.Core.Coercion.Axiom.html#cab_incomps"><span class="hs-identifier hs-var">cab_incomps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176384"><span class="annot"><span class="annottext">[CoAxBranch]
</span><a href="#local-6989586621681176384"><span class="hs-identifier hs-var">incomps</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-431"></span><span>
</span><span id="line-432"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceAxBranch :: [IfaceTvBndr]
-&gt; [IfaceTvBndr]
-&gt; [IfaceIdBndr]
-&gt; IfaceAppArgs
-&gt; [Role]
-&gt; IfaceType
-&gt; [Int]
-&gt; IfaceAxBranch
</span><a href="GHC.Iface.Syntax.html#IfaceAxBranch"><span class="hs-identifier hs-type">IfaceAxBranch</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifaxbTyVars :: [IfaceTvBndr]
</span><a href="GHC.Iface.Syntax.html#ifaxbTyVars"><span class="hs-identifier hs-var">ifaxbTyVars</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; [IfaceTvBndr]
</span><a href="GHC.CoreToIface.html#toIfaceTvBndrs"><span class="hs-identifier hs-var">toIfaceTvBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176396"><span class="hs-identifier hs-var">tvs</span></a></span><span>
</span><span id="line-433"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifaxbCoVars :: [IfaceIdBndr]
</span><a href="GHC.Iface.Syntax.html#ifaxbCoVars"><span class="hs-identifier hs-var">ifaxbCoVars</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; IfaceIdBndr) -&gt; [Id] -&gt; [IfaceIdBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IfaceIdBndr
</span><a href="GHC.CoreToIface.html#toIfaceIdBndr"><span class="hs-identifier hs-var">toIfaceIdBndr</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176394"><span class="hs-identifier hs-var">cvs</span></a></span><span>
</span><span id="line-434"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifaxbEtaTyVars :: [IfaceTvBndr]
</span><a href="GHC.Iface.Syntax.html#ifaxbEtaTyVars"><span class="hs-identifier hs-var">ifaxbEtaTyVars</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Id] -&gt; [IfaceTvBndr]
</span><a href="GHC.CoreToIface.html#toIfaceTvBndrs"><span class="hs-identifier hs-var">toIfaceTvBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176392"><span class="hs-identifier hs-var">eta_tvs</span></a></span><span>
</span><span id="line-435"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifaxbLHS :: IfaceAppArgs
</span><a href="GHC.Iface.Syntax.html#ifaxbLHS"><span class="hs-identifier hs-var">ifaxbLHS</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Type] -&gt; IfaceAppArgs
</span><a href="GHC.CoreToIface.html#toIfaceTcArgs"><span class="hs-identifier hs-var">toIfaceTcArgs</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176400"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176390"><span class="hs-identifier hs-var">lhs</span></a></span><span>
</span><span id="line-436"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifaxbRoles :: [Role]
</span><a href="GHC.Iface.Syntax.html#ifaxbRoles"><span class="hs-identifier hs-var">ifaxbRoles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Role]
</span><a href="#local-6989586621681176388"><span class="hs-identifier hs-var">roles</span></a></span><span>
</span><span id="line-437"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifaxbRHS :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifaxbRHS"><span class="hs-identifier hs-var">ifaxbRHS</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#toIfaceType"><span class="hs-identifier hs-var">toIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176386"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-438"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifaxbIncomps :: [Int]
</span><a href="GHC.Iface.Syntax.html#ifaxbIncomps"><span class="hs-identifier hs-var">ifaxbIncomps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Int]
</span><a href="#local-6989586621681176372"><span class="hs-identifier hs-var">iface_incomps</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-439"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-440"></span><span>    </span><span id="local-6989586621681176372"><span class="annot"><span class="annottext">iface_incomps :: [Int]
</span><a href="#local-6989586621681176372"><span class="hs-identifier hs-var hs-var">iface_incomps</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoAxBranch -&gt; Int) -&gt; [CoAxBranch] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Maybe Int -&gt; Int
forall a. HasCallStack =&gt; String -&gt; Maybe a -&gt; a
</span><a href="GHC.Data.Maybe.html#expectJust"><span class="hs-identifier hs-var">expectJust</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;iface_incomps&quot;</span></span><span>
</span><span id="line-441"></span><span>                        </span><span class="annot"><span class="annottext">(Maybe Int -&gt; Int)
-&gt; (CoAxBranch -&gt; Maybe Int) -&gt; CoAxBranch -&gt; Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(([Type] -&gt; Bool) -&gt; [[Type]] -&gt; Maybe Int)
-&gt; [[Type]] -&gt; ([Type] -&gt; Bool) -&gt; Maybe Int
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">([Type] -&gt; Bool) -&gt; [[Type]] -&gt; Maybe Int
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Maybe Int
</span><a href="../../base/src/Data.OldList.html#findIndex"><span class="hs-identifier hs-var">findIndex</span></a></span><span> </span><span class="annot"><span class="annottext">[[Type]]
</span><a href="#local-6989586621681176399"><span class="hs-identifier hs-var">lhs_s</span></a></span><span>
</span><span id="line-442"></span><span>                        </span><span class="annot"><span class="annottext">(([Type] -&gt; Bool) -&gt; Maybe Int)
-&gt; (CoAxBranch -&gt; [Type] -&gt; Bool) -&gt; CoAxBranch -&gt; Maybe Int
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[Type] -&gt; [Type] -&gt; Bool
</span><a href="GHC.Core.Type.html#eqTypes"><span class="hs-identifier hs-var">eqTypes</span></a></span><span>
</span><span id="line-443"></span><span>                        </span><span class="annot"><span class="annottext">([Type] -&gt; [Type] -&gt; Bool)
-&gt; (CoAxBranch -&gt; [Type]) -&gt; CoAxBranch -&gt; [Type] -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxBranch -&gt; [Type]
</span><a href="GHC.Core.Coercion.Axiom.html#coAxBranchLHS"><span class="hs-identifier hs-var">coAxBranchLHS</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CoAxBranch]
</span><a href="#local-6989586621681176384"><span class="hs-identifier hs-var">incomps</span></a></span><span>
</span><span id="line-444"></span><span>
</span><span id="line-445"></span><span class="hs-comment">-----------------</span><span>
</span><span id="line-446"></span><span class="annot"><a href="GHC.Iface.Make.html#tyConToIfaceDecl"><span class="hs-identifier hs-type">tyConToIfaceDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyCon"><span class="hs-identifier hs-type">TyCon</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-447"></span><span class="hs-comment">-- We *do* tidy TyCons, because they are not (and cannot</span><span>
</span><span id="line-448"></span><span class="hs-comment">-- conveniently be) built in tidy form</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- The returned TidyEnv is the one after tidying the tyConTyVars</span><span>
</span><span id="line-450"></span><span id="tyConToIfaceDecl"><span class="annot"><span class="annottext">tyConToIfaceDecl :: TidyEnv -&gt; TyCon -&gt; (TidyEnv, IfaceDecl)
</span><a href="GHC.Iface.Make.html#tyConToIfaceDecl"><span class="hs-identifier hs-var hs-var">tyConToIfaceDecl</span></a></span></span><span> </span><span id="local-6989586621681176366"><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176366"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681176365"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span></span><span>
</span><span id="line-451"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176364"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176364"><span class="hs-identifier hs-var">clas</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Class
</span><a href="GHC.Core.TyCon.html#tyConClass_maybe"><span class="hs-identifier hs-var">tyConClass_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-452"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; Class -&gt; (TidyEnv, IfaceDecl)
</span><a href="GHC.Iface.Make.html#classToIfaceDecl"><span class="hs-identifier hs-var">classToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176366"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176364"><span class="hs-identifier hs-var">clas</span></a></span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176361"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176361"><span class="hs-identifier hs-var">syn_rhs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Type
</span><a href="GHC.Core.TyCon.html#synTyConRhs_maybe"><span class="hs-identifier hs-var">synTyConRhs_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-455"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span>
</span><span id="line-456"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceSynonym :: Name
-&gt; [Role]
-&gt; [IfaceTyConBinder]
-&gt; IfaceType
-&gt; IfaceType
-&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceSynonym"><span class="hs-identifier hs-type">IfaceSynonym</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-457"></span><span>                     </span><span class="annot"><span class="annottext">ifRoles :: [Role]
</span><a href="GHC.Iface.Syntax.html#ifRoles"><span class="hs-identifier hs-var">ifRoles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Role]
</span><a href="GHC.Core.TyCon.html#tyConRoles"><span class="hs-identifier hs-var">tyConRoles</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-458"></span><span>                     </span><span class="annot"><span class="annottext">ifSynRhs :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifSynRhs"><span class="hs-identifier hs-var">ifSynRhs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; IfaceType
</span><a href="#local-6989586621681176354"><span class="hs-identifier hs-var">if_syn_type</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176361"><span class="hs-identifier hs-var">syn_rhs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-459"></span><span>                     </span><span class="annot"><span class="annottext">ifBinders :: [IfaceTyConBinder]
</span><a href="GHC.Iface.Syntax.html#ifBinders"><span class="hs-identifier hs-var">ifBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceTyConBinder]
</span><a href="#local-6989586621681176352"><span class="hs-identifier hs-var">if_binders</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-460"></span><span>                     </span><span class="annot"><span class="annottext">ifResKind :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifResKind"><span class="hs-identifier hs-var">ifResKind</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621681176350"><span class="hs-identifier hs-var">if_res_kind</span></a></span><span>
</span><span id="line-461"></span><span>                   </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-462"></span><span>
</span><span id="line-463"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176349"><span class="annot"><span class="annottext">FamTyConFlav
</span><a href="#local-6989586621681176349"><span class="hs-identifier hs-var">fam_flav</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe FamTyConFlav
</span><a href="GHC.Core.TyCon.html#famTyConFlav_maybe"><span class="hs-identifier hs-var">famTyConFlav_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-464"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span>
</span><span id="line-465"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceFamily :: Name
-&gt; Maybe RuleName
-&gt; [IfaceTyConBinder]
-&gt; IfaceType
-&gt; IfaceFamTyConFlav
-&gt; Injectivity
-&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceFamily"><span class="hs-identifier hs-type">IfaceFamily</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-466"></span><span>                    </span><span class="annot"><span class="annottext">ifResVar :: Maybe RuleName
</span><a href="GHC.Iface.Syntax.html#ifResVar"><span class="hs-identifier hs-var">ifResVar</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe RuleName
</span><a href="#local-6989586621681176345"><span class="hs-identifier hs-var">if_res_var</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-467"></span><span>                    </span><span class="annot"><span class="annottext">ifFamFlav :: IfaceFamTyConFlav
</span><a href="GHC.Iface.Syntax.html#ifFamFlav"><span class="hs-identifier hs-var">ifFamFlav</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FamTyConFlav -&gt; IfaceFamTyConFlav
</span><a href="#local-6989586621681176343"><span class="hs-identifier hs-var">to_if_fam_flav</span></a></span><span> </span><span class="annot"><span class="annottext">FamTyConFlav
</span><a href="#local-6989586621681176349"><span class="hs-identifier hs-var">fam_flav</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-468"></span><span>                    </span><span class="annot"><span class="annottext">ifBinders :: [IfaceTyConBinder]
</span><a href="GHC.Iface.Syntax.html#ifBinders"><span class="hs-identifier hs-var">ifBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceTyConBinder]
</span><a href="#local-6989586621681176352"><span class="hs-identifier hs-var">if_binders</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-469"></span><span>                    </span><span class="annot"><span class="annottext">ifResKind :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifResKind"><span class="hs-identifier hs-var">ifResKind</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621681176350"><span class="hs-identifier hs-var">if_res_kind</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-470"></span><span>                    </span><span class="annot"><span class="annottext">ifFamInj :: Injectivity
</span><a href="GHC.Iface.Syntax.html#ifFamInj"><span class="hs-identifier hs-var">ifFamInj</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Injectivity
</span><a href="GHC.Core.TyCon.html#tyConInjectivityInfo"><span class="hs-identifier hs-var">tyConInjectivityInfo</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-471"></span><span>                  </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-472"></span><span>
</span><span id="line-473"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isAlgTyCon"><span class="hs-identifier hs-var">isAlgTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-474"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span>
</span><span id="line-475"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceData :: Name
-&gt; [IfaceTyConBinder]
-&gt; IfaceType
-&gt; Maybe CType
-&gt; [Role]
-&gt; IfaceContext
-&gt; IfaceConDecls
-&gt; Bool
-&gt; IfaceTyConParent
-&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceData"><span class="hs-identifier hs-type">IfaceData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-476"></span><span>                  </span><span class="annot"><span class="annottext">ifBinders :: [IfaceTyConBinder]
</span><a href="GHC.Iface.Syntax.html#ifBinders"><span class="hs-identifier hs-var">ifBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceTyConBinder]
</span><a href="#local-6989586621681176352"><span class="hs-identifier hs-var">if_binders</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-477"></span><span>                  </span><span class="annot"><span class="annottext">ifResKind :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifResKind"><span class="hs-identifier hs-var">ifResKind</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621681176350"><span class="hs-identifier hs-var">if_res_kind</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-478"></span><span>                  </span><span class="annot"><span class="annottext">ifCType :: Maybe CType
</span><a href="GHC.Iface.Syntax.html#ifCType"><span class="hs-identifier hs-var">ifCType</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe CType
</span><a href="GHC.Core.TyCon.html#tyConCType"><span class="hs-identifier hs-var hs-var">tyConCType</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-479"></span><span>                  </span><span class="annot"><span class="annottext">ifRoles :: [Role]
</span><a href="GHC.Iface.Syntax.html#ifRoles"><span class="hs-identifier hs-var">ifRoles</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Role]
</span><a href="GHC.Core.TyCon.html#tyConRoles"><span class="hs-identifier hs-var">tyConRoles</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-480"></span><span>                  </span><span class="annot"><span class="annottext">ifCtxt :: IfaceContext
</span><a href="GHC.Iface.Syntax.html#ifCtxt"><span class="hs-identifier hs-var">ifCtxt</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; [Type] -&gt; IfaceContext
</span><a href="GHC.CoreToIface.html#tidyToIfaceContext"><span class="hs-identifier hs-var">tidyToIfaceContext</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [Type]
</span><a href="GHC.Core.TyCon.html#tyConStupidTheta"><span class="hs-identifier hs-var">tyConStupidTheta</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-481"></span><span>                  </span><span class="annot"><span class="annottext">ifCons :: IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#ifCons"><span class="hs-identifier hs-var">ifCons</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AlgTyConRhs -&gt; IfaceConDecls
</span><a href="#local-6989586621681176332"><span class="hs-identifier hs-var">ifaceConDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; AlgTyConRhs
</span><a href="GHC.Core.TyCon.html#algTyConRhs"><span class="hs-identifier hs-var">algTyConRhs</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-482"></span><span>                  </span><span class="annot"><span class="annottext">ifGadtSyntax :: Bool
</span><a href="GHC.Iface.Syntax.html#ifGadtSyntax"><span class="hs-identifier hs-var">ifGadtSyntax</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isGadtSyntaxTyCon"><span class="hs-identifier hs-var">isGadtSyntaxTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-483"></span><span>                  </span><span class="annot"><span class="annottext">ifParent :: IfaceTyConParent
</span><a href="GHC.Iface.Syntax.html#ifParent"><span class="hs-identifier hs-var">ifParent</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTyConParent
</span><a href="#local-6989586621681176327"><span class="hs-identifier hs-var">parent</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-484"></span><span>
</span><span id="line-485"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>  </span><span class="hs-comment">-- FunTyCon, PrimTyCon, promoted TyCon/DataCon</span><span>
</span><span id="line-486"></span><span>  </span><span class="hs-comment">-- We only convert these TyCons to IfaceTyCons when we are</span><span>
</span><span id="line-487"></span><span>  </span><span class="hs-comment">-- just about to pretty-print them, not because we are going</span><span>
</span><span id="line-488"></span><span>  </span><span class="hs-comment">-- to put them into interface files</span><span>
</span><span id="line-489"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176366"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-490"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceData :: Name
-&gt; [IfaceTyConBinder]
-&gt; IfaceType
-&gt; Maybe CType
-&gt; [Role]
-&gt; IfaceContext
-&gt; IfaceConDecls
-&gt; Bool
-&gt; IfaceTyConParent
-&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceData"><span class="hs-identifier hs-type">IfaceData</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-491"></span><span>                  </span><span class="annot"><span class="annottext">ifBinders :: [IfaceTyConBinder]
</span><a href="GHC.Iface.Syntax.html#ifBinders"><span class="hs-identifier hs-var">ifBinders</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceTyConBinder]
</span><a href="#local-6989586621681176352"><span class="hs-identifier hs-var">if_binders</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-492"></span><span>                  </span><span class="annot"><span class="annottext">ifResKind :: IfaceType
</span><a href="GHC.Iface.Syntax.html#ifResKind"><span class="hs-identifier hs-var">ifResKind</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType
</span><a href="#local-6989586621681176350"><span class="hs-identifier hs-var">if_res_kind</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-493"></span><span>                  </span><span class="annot"><span class="annottext">ifCType :: Maybe CType
</span><a href="GHC.Iface.Syntax.html#ifCType"><span class="hs-identifier hs-var">ifCType</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CType
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-494"></span><span>                  </span><span class="annot"><span class="annottext">ifRoles :: [Role]
</span><a href="GHC.Iface.Syntax.html#ifRoles"><span class="hs-identifier hs-var">ifRoles</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Role]
</span><a href="GHC.Core.TyCon.html#tyConRoles"><span class="hs-identifier hs-var">tyConRoles</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-495"></span><span>                  </span><span class="annot"><span class="annottext">ifCtxt :: IfaceContext
</span><a href="GHC.Iface.Syntax.html#ifCtxt"><span class="hs-identifier hs-var">ifCtxt</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-496"></span><span>                  </span><span class="annot"><span class="annottext">ifCons :: IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#ifCons"><span class="hs-identifier hs-var">ifCons</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceConDecl] -&gt; IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#IfDataTyCon"><span class="hs-identifier hs-var">IfDataTyCon</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-497"></span><span>                  </span><span class="annot"><span class="annottext">ifGadtSyntax :: Bool
</span><a href="GHC.Iface.Syntax.html#ifGadtSyntax"><span class="hs-identifier hs-var">ifGadtSyntax</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">,</span><span>
</span><span id="line-498"></span><span>                  </span><span class="annot"><span class="annottext">ifParent :: IfaceTyConParent
</span><a href="GHC.Iface.Syntax.html#ifParent"><span class="hs-identifier hs-var">ifParent</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTyConParent
</span><a href="GHC.Iface.Syntax.html#IfNoParent"><span class="hs-identifier hs-var">IfNoParent</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-499"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-500"></span><span>    </span><span class="hs-comment">-- NOTE: Not all TyCons have `tyConTyVars` field. Forcing this when `tycon`</span><span>
</span><span id="line-501"></span><span>    </span><span class="hs-comment">-- is one of these TyCons (FunTyCon, PrimTyCon, PromotedDataCon) will cause</span><span>
</span><span id="line-502"></span><span>    </span><span class="hs-comment">-- an error.</span><span>
</span><span id="line-503"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681176359"><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176324"><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621681176324"><span class="hs-identifier hs-var">tc_binders</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; [TyConBinder] -&gt; (TidyEnv, [TyConBinder])
</span><a href="GHC.Iface.Make.html#tidyTyConBinders"><span class="hs-identifier hs-var">tidyTyConBinders</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176366"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [TyConBinder]
</span><a href="GHC.Core.TyCon.html#tyConBinders"><span class="hs-identifier hs-var hs-var">tyConBinders</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-504"></span><span>    </span><span id="local-6989586621681176321"><span class="annot"><span class="annottext">tc_tyvars :: [Id]
</span><a href="#local-6989586621681176321"><span class="hs-identifier hs-var hs-var">tc_tyvars</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyConBinder] -&gt; [Id]
forall tv argf. [VarBndr tv argf] -&gt; [tv]
</span><a href="GHC.Types.Var.html#binderVars"><span class="hs-identifier hs-var">binderVars</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621681176324"><span class="hs-identifier hs-var">tc_binders</span></a></span><span>
</span><span id="line-505"></span><span>    </span><span id="local-6989586621681176352"><span class="annot"><span class="annottext">if_binders :: [IfaceTyConBinder]
</span><a href="#local-6989586621681176352"><span class="hs-identifier hs-var hs-var">if_binders</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyConBinder] -&gt; [IfaceTyConBinder]
forall vis. [VarBndr Id vis] -&gt; [VarBndr IfaceBndr vis]
</span><a href="GHC.CoreToIface.html#toIfaceTyCoVarBinders"><span class="hs-identifier hs-var">toIfaceTyCoVarBinders</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621681176324"><span class="hs-identifier hs-var">tc_binders</span></a></span><span>
</span><span id="line-506"></span><span>                     </span><span class="hs-comment">-- No tidying of the binders; they are already tidy</span><span>
</span><span id="line-507"></span><span>    </span><span id="local-6989586621681176350"><span class="annot"><span class="annottext">if_res_kind :: IfaceType
</span><a href="#local-6989586621681176350"><span class="hs-identifier hs-var hs-var">if_res_kind</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; Type
</span><a href="GHC.Core.TyCon.html#tyConResKind"><span class="hs-identifier hs-var hs-var">tyConResKind</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-508"></span><span>    </span><span id="local-6989586621681176354"><span class="annot"><span class="annottext">if_syn_type :: Type -&gt; IfaceType
</span><a href="#local-6989586621681176354"><span class="hs-identifier hs-var hs-var">if_syn_type</span></a></span></span><span> </span><span id="local-6989586621681176316"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176316"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176316"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-509"></span><span>    </span><span id="local-6989586621681176345"><span class="annot"><span class="annottext">if_res_var :: Maybe RuleName
</span><a href="#local-6989586621681176345"><span class="hs-identifier hs-var hs-var">if_res_var</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; RuleName
forall a. NamedThing a =&gt; a -&gt; RuleName
</span><a href="GHC.Types.Name.html#getOccFS"><span class="hs-identifier hs-var">getOccFS</span></a></span><span> </span><span class="annot"><span class="annottext">(Name -&gt; RuleName) -&gt; Maybe Name -&gt; Maybe RuleName
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe Name
</span><a href="GHC.Core.TyCon.html#tyConFamilyResVar_maybe"><span class="hs-identifier hs-var">tyConFamilyResVar_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span>
</span><span id="line-510"></span><span>
</span><span id="line-511"></span><span>    </span><span id="local-6989586621681176327"><span class="annot"><span class="annottext">parent :: IfaceTyConParent
</span><a href="#local-6989586621681176327"><span class="hs-identifier hs-var hs-var">parent</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Maybe (TyCon, [Type], CoAxiom Unbranched)
</span><a href="GHC.Core.TyCon.html#tyConFamInstSig_maybe"><span class="hs-identifier hs-var">tyConFamInstSig_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-512"></span><span>               </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681176309"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176309"><span class="hs-identifier hs-var">tc</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176308"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176308"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176307"><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621681176307"><span class="hs-identifier hs-var">ax</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Name -&gt; IfaceTyCon -&gt; IfaceAppArgs -&gt; IfaceTyConParent
</span><a href="GHC.Iface.Syntax.html#IfDataInstance"><span class="hs-identifier hs-var">IfDataInstance</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoAxiom Unbranched -&gt; Name
forall (br :: BranchFlag). CoAxiom br -&gt; Name
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomName"><span class="hs-identifier hs-var">coAxiomName</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621681176307"><span class="hs-identifier hs-var">ax</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-513"></span><span>                                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; IfaceTyCon
</span><a href="GHC.CoreToIface.html#toIfaceTyCon"><span class="hs-identifier hs-var">toIfaceTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176309"><span class="hs-identifier hs-var">tc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>                                                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; TyCon -&gt; [Type] -&gt; IfaceAppArgs
</span><a href="GHC.CoreToIface.html#tidyToIfaceTcArgs"><span class="hs-identifier hs-var">tidyToIfaceTcArgs</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176309"><span class="hs-identifier hs-var">tc</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176308"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-515"></span><span>               </span><span class="annot"><span class="annottext">Maybe (TyCon, [Type], CoAxiom Unbranched)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IfaceTyConParent
</span><a href="GHC.Iface.Syntax.html#IfNoParent"><span class="hs-identifier hs-var">IfNoParent</span></a></span><span>
</span><span id="line-516"></span><span>
</span><span id="line-517"></span><span>    </span><span id="local-6989586621681176343"><span class="annot"><span class="annottext">to_if_fam_flav :: FamTyConFlav -&gt; IfaceFamTyConFlav
</span><a href="#local-6989586621681176343"><span class="hs-identifier hs-var hs-var">to_if_fam_flav</span></a></span></span><span> </span><span class="annot"><span class="annottext">FamTyConFlav
</span><a href="GHC.Core.TyCon.html#OpenSynFamilyTyCon"><span class="hs-identifier hs-var">OpenSynFamilyTyCon</span></a></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceFamTyConFlav
</span><a href="GHC.Iface.Syntax.html#IfaceOpenSynFamilyTyCon"><span class="hs-identifier hs-var">IfaceOpenSynFamilyTyCon</span></a></span><span>
</span><span id="line-518"></span><span>    </span><span class="annot"><a href="#local-6989586621681176343"><span class="hs-identifier hs-var">to_if_fam_flav</span></a></span><span> </span><span class="annot"><span class="annottext">FamTyConFlav
</span><a href="GHC.Core.TyCon.html#AbstractClosedSynFamilyTyCon"><span class="hs-identifier hs-var">AbstractClosedSynFamilyTyCon</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceFamTyConFlav
</span><a href="GHC.Iface.Syntax.html#IfaceAbstractClosedSynFamilyTyCon"><span class="hs-identifier hs-var">IfaceAbstractClosedSynFamilyTyCon</span></a></span><span>
</span><span id="line-519"></span><span>    </span><span class="annot"><a href="#local-6989586621681176343"><span class="hs-identifier hs-var">to_if_fam_flav</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#DataFamilyTyCon"><span class="hs-identifier hs-type">DataFamilyTyCon</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceFamTyConFlav
</span><a href="GHC.Iface.Syntax.html#IfaceDataFamilyTyCon"><span class="hs-identifier hs-var">IfaceDataFamilyTyCon</span></a></span><span>
</span><span id="line-520"></span><span>    </span><span class="annot"><a href="#local-6989586621681176343"><span class="hs-identifier hs-var">to_if_fam_flav</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#BuiltInSynFamTyCon"><span class="hs-identifier hs-type">BuiltInSynFamTyCon</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceFamTyConFlav
</span><a href="GHC.Iface.Syntax.html#IfaceBuiltInSynFamTyCon"><span class="hs-identifier hs-var">IfaceBuiltInSynFamTyCon</span></a></span><span>
</span><span id="line-521"></span><span>    </span><span class="annot"><a href="#local-6989586621681176343"><span class="hs-identifier hs-var">to_if_fam_flav</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#ClosedSynFamilyTyCon"><span class="hs-identifier hs-type">ClosedSynFamilyTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (CoAxiom Branched)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Name, [IfaceAxBranch]) -&gt; IfaceFamTyConFlav
</span><a href="GHC.Iface.Syntax.html#IfaceClosedSynFamilyTyCon"><span class="hs-identifier hs-var">IfaceClosedSynFamilyTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Name, [IfaceAxBranch])
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-522"></span><span>    </span><span class="annot"><a href="#local-6989586621681176343"><span class="hs-identifier hs-var">to_if_fam_flav</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#ClosedSynFamilyTyCon"><span class="hs-identifier hs-type">ClosedSynFamilyTyCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176293"><span class="annot"><span class="annottext">CoAxiom Branched
</span><a href="#local-6989586621681176293"><span class="hs-identifier hs-var">ax</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-523"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Name, [IfaceAxBranch]) -&gt; IfaceFamTyConFlav
</span><a href="GHC.Iface.Syntax.html#IfaceClosedSynFamilyTyCon"><span class="hs-identifier hs-var">IfaceClosedSynFamilyTyCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Name, [IfaceAxBranch]) -&gt; Maybe (Name, [IfaceAxBranch])
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176292"><span class="hs-identifier hs-var">axn</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[IfaceAxBranch]
</span><a href="#local-6989586621681176291"><span class="hs-identifier hs-var">ibr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-524"></span><span>      </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681176290"><span class="annot"><span class="annottext">defs :: [CoAxBranch]
</span><a href="#local-6989586621681176290"><span class="hs-identifier hs-var hs-var">defs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Branches Branched -&gt; [CoAxBranch]
forall (br :: BranchFlag). Branches br -&gt; [CoAxBranch]
</span><a href="GHC.Core.Coercion.Axiom.html#fromBranches"><span class="hs-identifier hs-var">fromBranches</span></a></span><span> </span><span class="annot"><span class="annottext">(Branches Branched -&gt; [CoAxBranch])
-&gt; Branches Branched -&gt; [CoAxBranch]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched -&gt; Branches Branched
forall (br :: BranchFlag). CoAxiom br -&gt; Branches br
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomBranches"><span class="hs-identifier hs-var">coAxiomBranches</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched
</span><a href="#local-6989586621681176293"><span class="hs-identifier hs-var">ax</span></a></span><span>
</span><span id="line-525"></span><span>            </span><span id="local-6989586621681176288"><span class="annot"><span class="annottext">lhss :: [[Type]]
</span><a href="#local-6989586621681176288"><span class="hs-identifier hs-var hs-var">lhss</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoAxBranch -&gt; [Type]) -&gt; [CoAxBranch] -&gt; [[Type]]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxBranch -&gt; [Type]
</span><a href="GHC.Core.Coercion.Axiom.html#coAxBranchLHS"><span class="hs-identifier hs-var">coAxBranchLHS</span></a></span><span> </span><span class="annot"><span class="annottext">[CoAxBranch]
</span><a href="#local-6989586621681176290"><span class="hs-identifier hs-var">defs</span></a></span><span>
</span><span id="line-526"></span><span>            </span><span id="local-6989586621681176291"><span class="annot"><span class="annottext">ibr :: [IfaceAxBranch]
</span><a href="#local-6989586621681176291"><span class="hs-identifier hs-var hs-var">ibr</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoAxBranch -&gt; IfaceAxBranch) -&gt; [CoAxBranch] -&gt; [IfaceAxBranch]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [[Type]] -&gt; CoAxBranch -&gt; IfaceAxBranch
</span><a href="GHC.Iface.Make.html#coAxBranchToIfaceBranch"><span class="hs-identifier hs-var">coAxBranchToIfaceBranch</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176365"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="annot"><span class="annottext">[[Type]]
</span><a href="#local-6989586621681176288"><span class="hs-identifier hs-var">lhss</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CoAxBranch]
</span><a href="#local-6989586621681176290"><span class="hs-identifier hs-var">defs</span></a></span><span>
</span><span id="line-527"></span><span>            </span><span id="local-6989586621681176292"><span class="annot"><span class="annottext">axn :: Name
</span><a href="#local-6989586621681176292"><span class="hs-identifier hs-var hs-var">axn</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched -&gt; Name
forall (br :: BranchFlag). CoAxiom br -&gt; Name
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomName"><span class="hs-identifier hs-var">coAxiomName</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Branched
</span><a href="#local-6989586621681176293"><span class="hs-identifier hs-var">ax</span></a></span><span>
</span><span id="line-528"></span><span>
</span><span id="line-529"></span><span>    </span><span id="local-6989586621681176332"><span class="annot"><span class="annottext">ifaceConDecls :: AlgTyConRhs -&gt; IfaceConDecls
</span><a href="#local-6989586621681176332"><span class="hs-identifier hs-var hs-var">ifaceConDecls</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#NewTyCon"><span class="hs-identifier hs-type">NewTyCon</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">data_con :: AlgTyConRhs -&gt; DataCon
</span><a href="GHC.Core.TyCon.html#data_con"><span class="hs-identifier hs-var">data_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176285"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176285"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceConDecl -&gt; IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#IfNewTyCon"><span class="hs-identifier hs-var">IfNewTyCon</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; IfaceConDecl
</span><a href="#local-6989586621681176283"><span class="hs-identifier hs-var">ifaceConDecl</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176285"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-530"></span><span>    </span><span class="annot"><a href="#local-6989586621681176332"><span class="hs-identifier hs-var">ifaceConDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#DataTyCon"><span class="hs-identifier hs-type">DataTyCon</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">data_cons :: AlgTyConRhs -&gt; [DataCon]
</span><a href="GHC.Core.TyCon.html#data_cons"><span class="hs-identifier hs-var">data_cons</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176280"><span class="annot"><span class="annottext">[DataCon]
</span><a href="#local-6989586621681176280"><span class="hs-identifier hs-var">cons</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceConDecl] -&gt; IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#IfDataTyCon"><span class="hs-identifier hs-var">IfDataTyCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(DataCon -&gt; IfaceConDecl) -&gt; [DataCon] -&gt; [IfaceConDecl]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; IfaceConDecl
</span><a href="#local-6989586621681176283"><span class="hs-identifier hs-var">ifaceConDecl</span></a></span><span> </span><span class="annot"><span class="annottext">[DataCon]
</span><a href="#local-6989586621681176280"><span class="hs-identifier hs-var">cons</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-531"></span><span>    </span><span class="annot"><a href="#local-6989586621681176332"><span class="hs-identifier hs-var">ifaceConDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#TupleTyCon"><span class="hs-identifier hs-type">TupleTyCon</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">data_con :: AlgTyConRhs -&gt; DataCon
</span><a href="GHC.Core.TyCon.html#data_con"><span class="hs-identifier hs-var">data_con</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176278"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176278"><span class="hs-identifier hs-var">con</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceConDecl] -&gt; IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#IfDataTyCon"><span class="hs-identifier hs-var">IfDataTyCon</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">DataCon -&gt; IfaceConDecl
</span><a href="#local-6989586621681176283"><span class="hs-identifier hs-var">ifaceConDecl</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176278"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-532"></span><span>    </span><span class="annot"><a href="#local-6989586621681176332"><span class="hs-identifier hs-var">ifaceConDecls</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCon.html#SumTyCon"><span class="hs-identifier hs-type">SumTyCon</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">data_cons :: AlgTyConRhs -&gt; [DataCon]
</span><a href="GHC.Core.TyCon.html#data_cons"><span class="hs-identifier hs-var">data_cons</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176276"><span class="annot"><span class="annottext">[DataCon]
</span><a href="#local-6989586621681176276"><span class="hs-identifier hs-var">cons</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[IfaceConDecl] -&gt; IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#IfDataTyCon"><span class="hs-identifier hs-var">IfDataTyCon</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(DataCon -&gt; IfaceConDecl) -&gt; [DataCon] -&gt; [IfaceConDecl]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; IfaceConDecl
</span><a href="#local-6989586621681176283"><span class="hs-identifier hs-var">ifaceConDecl</span></a></span><span> </span><span class="annot"><span class="annottext">[DataCon]
</span><a href="#local-6989586621681176276"><span class="hs-identifier hs-var">cons</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-533"></span><span>    </span><span class="annot"><a href="#local-6989586621681176332"><span class="hs-identifier hs-var">ifaceConDecls</span></a></span><span> </span><span class="annot"><span class="annottext">AlgTyConRhs
</span><a href="GHC.Core.TyCon.html#AbstractTyCon"><span class="hs-identifier hs-var">AbstractTyCon</span></a></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceConDecls
</span><a href="GHC.Iface.Syntax.html#IfAbstractTyCon"><span class="hs-identifier hs-var">IfAbstractTyCon</span></a></span><span>
</span><span id="line-534"></span><span>        </span><span class="hs-comment">-- The AbstractTyCon case happens when a TyCon has been trimmed</span><span>
</span><span id="line-535"></span><span>        </span><span class="hs-comment">-- during tidying.</span><span>
</span><span id="line-536"></span><span>        </span><span class="hs-comment">-- Furthermore, tyThingToIfaceDecl is also used in GHC.Tc.Module</span><span>
</span><span id="line-537"></span><span>        </span><span class="hs-comment">-- for GHCi, when browsing a module, in which case the</span><span>
</span><span id="line-538"></span><span>        </span><span class="hs-comment">-- AbstractTyCon and TupleTyCon cases are perfectly sensible.</span><span>
</span><span id="line-539"></span><span>        </span><span class="hs-comment">-- (Tuple declarations are not serialised into interface files.)</span><span>
</span><span id="line-540"></span><span>
</span><span id="line-541"></span><span>    </span><span id="local-6989586621681176283"><span class="annot"><span class="annottext">ifaceConDecl :: DataCon -&gt; IfaceConDecl
</span><a href="#local-6989586621681176283"><span class="hs-identifier hs-var hs-var">ifaceConDecl</span></a></span></span><span> </span><span id="local-6989586621681176273"><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span></span><span>
</span><span id="line-542"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfCon :: Name
-&gt; Bool
-&gt; Bool
-&gt; [IfaceBndr]
-&gt; [IfaceForAllSpecBndr]
-&gt; [IfaceTvBndr]
-&gt; IfaceContext
-&gt; [(IfaceType, IfaceType)]
-&gt; [FieldLabel]
-&gt; [IfaceBang]
-&gt; [IfaceSrcBang]
-&gt; IfaceConDecl
</span><a href="GHC.Iface.Syntax.html#IfCon"><span class="hs-identifier hs-type">IfCon</span></a></span><span>   </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifConName :: Name
</span><a href="GHC.Iface.Syntax.html#ifConName"><span class="hs-identifier hs-var">ifConName</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Name
</span><a href="GHC.Core.DataCon.html#dataConName"><span class="hs-identifier hs-var">dataConName</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-543"></span><span>                    </span><span class="annot"><span class="annottext">ifConInfix :: Bool
</span><a href="GHC.Iface.Syntax.html#ifConInfix"><span class="hs-identifier hs-var">ifConInfix</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; Bool
</span><a href="GHC.Core.DataCon.html#dataConIsInfix"><span class="hs-identifier hs-var">dataConIsInfix</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-544"></span><span>                    </span><span class="annot"><span class="annottext">ifConWrapper :: Bool
</span><a href="GHC.Iface.Syntax.html#ifConWrapper"><span class="hs-identifier hs-var">ifConWrapper</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Id -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; Maybe Id
</span><a href="GHC.Core.DataCon.html#dataConWrapId_maybe"><span class="hs-identifier hs-var">dataConWrapId_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-545"></span><span>                    </span><span class="annot"><span class="annottext">ifConExTCvs :: [IfaceBndr]
</span><a href="GHC.Iface.Syntax.html#ifConExTCvs"><span class="hs-identifier hs-var">ifConExTCvs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; IfaceBndr) -&gt; [Id] -&gt; [IfaceBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IfaceBndr
</span><a href="GHC.CoreToIface.html#toIfaceBndr"><span class="hs-identifier hs-var">toIfaceBndr</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176263"><span class="hs-identifier hs-var">ex_tvs'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-546"></span><span>                    </span><span class="annot"><span class="annottext">ifConUserTvBinders :: [IfaceForAllSpecBndr]
</span><a href="GHC.Iface.Syntax.html#ifConUserTvBinders"><span class="hs-identifier hs-var">ifConUserTvBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(VarBndr Id Specificity -&gt; IfaceForAllSpecBndr)
-&gt; [VarBndr Id Specificity] -&gt; [IfaceForAllSpecBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">VarBndr Id Specificity -&gt; IfaceForAllSpecBndr
forall flag. VarBndr Id flag -&gt; VarBndr IfaceBndr flag
</span><a href="GHC.CoreToIface.html#toIfaceForAllBndr"><span class="hs-identifier hs-var">toIfaceForAllBndr</span></a></span><span> </span><span class="annot"><span class="annottext">[VarBndr Id Specificity]
</span><a href="#local-6989586621681176260"><span class="hs-identifier hs-var">user_bndrs'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-547"></span><span>                    </span><span class="annot"><span class="annottext">ifConEqSpec :: [IfaceTvBndr]
</span><a href="GHC.Iface.Syntax.html#ifConEqSpec"><span class="hs-identifier hs-var">ifConEqSpec</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(EqSpec -&gt; IfaceTvBndr) -&gt; [EqSpec] -&gt; [IfaceTvBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Id, Type) -&gt; IfaceTvBndr
</span><a href="#local-6989586621681176258"><span class="hs-identifier hs-var">to_eq_spec</span></a></span><span> </span><span class="annot"><span class="annottext">((Id, Type) -&gt; IfaceTvBndr)
-&gt; (EqSpec -&gt; (Id, Type)) -&gt; EqSpec -&gt; IfaceTvBndr
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">EqSpec -&gt; (Id, Type)
</span><a href="GHC.Core.DataCon.html#eqSpecPair"><span class="hs-identifier hs-var">eqSpecPair</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621681176256"><span class="hs-identifier hs-var">eq_spec</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-548"></span><span>                    </span><span class="annot"><span class="annottext">ifConCtxt :: IfaceContext
</span><a href="GHC.Iface.Syntax.html#ifConCtxt"><span class="hs-identifier hs-var">ifConCtxt</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; [Type] -&gt; IfaceContext
</span><a href="GHC.CoreToIface.html#tidyToIfaceContext"><span class="hs-identifier hs-var">tidyToIfaceContext</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176253"><span class="hs-identifier hs-var">theta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-549"></span><span>                    </span><span class="annot"><span class="annottext">ifConArgTys :: [(IfaceType, IfaceType)]
</span><a href="GHC.Iface.Syntax.html#ifConArgTys"><span class="hs-identifier hs-var">ifConArgTys</span></a></span><span>  </span><span class="hs-glyph">=</span><span>
</span><span id="line-550"></span><span>                      </span><span class="annot"><span class="annottext">(Scaled Type -&gt; (IfaceType, IfaceType))
-&gt; [Scaled Type] -&gt; [(IfaceType, IfaceType)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Scaled"><span class="hs-identifier hs-type">Scaled</span></a></span><span> </span><span id="local-6989586621681176250"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176250"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621681176249"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176249"><span class="hs-identifier hs-var">t</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176250"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-551"></span><span>                                          </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176249"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681176248"><span class="hs-identifier hs-var">arg_tys</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-552"></span><span>                    </span><span class="annot"><span class="annottext">ifConFields :: [FieldLabel]
</span><a href="GHC.Iface.Syntax.html#ifConFields"><span class="hs-identifier hs-var">ifConFields</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [FieldLabel]
</span><a href="GHC.Core.DataCon.html#dataConFieldLabels"><span class="hs-identifier hs-var">dataConFieldLabels</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-553"></span><span>                    </span><span class="annot"><span class="annottext">ifConStricts :: [IfaceBang]
</span><a href="GHC.Iface.Syntax.html#ifConStricts"><span class="hs-identifier hs-var">ifConStricts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsImplBang -&gt; IfaceBang) -&gt; [HsImplBang] -&gt; [IfaceBang]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; HsImplBang -&gt; IfaceBang
</span><a href="GHC.CoreToIface.html#toIfaceBang"><span class="hs-identifier hs-var">toIfaceBang</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-554"></span><span>                                       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [HsImplBang]
</span><a href="GHC.Core.DataCon.html#dataConImplBangs"><span class="hs-identifier hs-var">dataConImplBangs</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-555"></span><span>                    </span><span class="annot"><span class="annottext">ifConSrcStricts :: [IfaceSrcBang]
</span><a href="GHC.Iface.Syntax.html#ifConSrcStricts"><span class="hs-identifier hs-var">ifConSrcStricts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(HsSrcBang -&gt; IfaceSrcBang) -&gt; [HsSrcBang] -&gt; [IfaceSrcBang]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">HsSrcBang -&gt; IfaceSrcBang
</span><a href="GHC.CoreToIface.html#toIfaceSrcBang"><span class="hs-identifier hs-var">toIfaceSrcBang</span></a></span><span>
</span><span id="line-556"></span><span>                                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DataCon -&gt; [HsSrcBang]
</span><a href="GHC.Core.DataCon.html#dataConSrcBangs"><span class="hs-identifier hs-var">dataConSrcBangs</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span class="hs-special">)</span><span class="hs-special">}</span><span>
</span><span id="line-557"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-558"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621681176239"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176239"><span class="hs-identifier hs-var">univ_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176238"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176238"><span class="hs-identifier hs-var">ex_tvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176256"><span class="annot"><span class="annottext">[EqSpec]
</span><a href="#local-6989586621681176256"><span class="hs-identifier hs-var">eq_spec</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176253"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176253"><span class="hs-identifier hs-var">theta</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176248"><span class="annot"><span class="annottext">[Scaled Type]
</span><a href="#local-6989586621681176248"><span class="hs-identifier hs-var">arg_tys</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-559"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; ([Id], [Id], [EqSpec], [Type], [Scaled Type], Type)
</span><a href="GHC.Core.DataCon.html#dataConFullSig"><span class="hs-identifier hs-var">dataConFullSig</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-560"></span><span>          </span><span id="local-6989586621681176236"><span class="annot"><span class="annottext">user_bndrs :: [VarBndr Id Specificity]
</span><a href="#local-6989586621681176236"><span class="hs-identifier hs-var hs-var">user_bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DataCon -&gt; [VarBndr Id Specificity]
</span><a href="GHC.Core.DataCon.html#dataConUserTyVarBinders"><span class="hs-identifier hs-var">dataConUserTyVarBinders</span></a></span><span> </span><span class="annot"><span class="annottext">DataCon
</span><a href="#local-6989586621681176273"><span class="hs-identifier hs-var">data_con</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span>          </span><span class="hs-comment">-- Tidy the univ_tvs of the data constructor to be identical</span><span>
</span><span id="line-563"></span><span>          </span><span class="hs-comment">-- to the tyConTyVars of the type constructor.  This means</span><span>
</span><span id="line-564"></span><span>          </span><span class="hs-comment">-- (a) we don't need to redundantly put them into the interface file</span><span>
</span><span id="line-565"></span><span>          </span><span class="hs-comment">-- (b) when pretty-printing an Iface data declaration in H98-style syntax,</span><span>
</span><span id="line-566"></span><span>          </span><span class="hs-comment">--     we know that the type variables will line up</span><span>
</span><span id="line-567"></span><span>          </span><span class="hs-comment">-- The latter (b) is important because we pretty-print type constructors</span><span>
</span><span id="line-568"></span><span>          </span><span class="hs-comment">-- by converting to Iface syntax and pretty-printing that</span><span>
</span><span id="line-569"></span><span>          </span><span id="local-6989586621681176234"><span class="annot"><span class="annottext">con_env1 :: TidyEnv
</span><a href="#local-6989586621681176234"><span class="hs-identifier hs-var hs-var">con_env1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; TidyOccEnv
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176359"><span class="hs-identifier hs-var">tc_env1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[(Id, Id)] -&gt; VarEnv Id
forall a. [(Id, a)] -&gt; VarEnv a
</span><a href="GHC.Types.Var.Env.html#mkVarEnv"><span class="hs-identifier hs-var">mkVarEnv</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; [Id] -&gt; [Id] -&gt; [(Id, Id)]
forall a b. String -&gt; [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="GHC.Utils.Misc.html#zipEqual"><span class="hs-identifier hs-var">zipEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ifaceConDecl&quot;</span></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176239"><span class="hs-identifier hs-var">univ_tvs</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176321"><span class="hs-identifier hs-var">tc_tyvars</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-570"></span><span>                     </span><span class="hs-comment">-- A bit grimy, perhaps, but it's simple!</span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621681176254"><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176263"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176263"><span class="hs-identifier hs-var">ex_tvs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; [Id] -&gt; (TidyEnv, [Id])
</span><a href="GHC.Core.TyCo.Tidy.html#tidyVarBndrs"><span class="hs-identifier hs-var">tidyVarBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176234"><span class="hs-identifier hs-var">con_env1</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176238"><span class="hs-identifier hs-var">ex_tvs</span></a></span><span>
</span><span id="line-573"></span><span>          </span><span id="local-6989586621681176260"><span class="annot"><span class="annottext">user_bndrs' :: [VarBndr Id Specificity]
</span><a href="#local-6989586621681176260"><span class="hs-identifier hs-var hs-var">user_bndrs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(VarBndr Id Specificity -&gt; VarBndr Id Specificity)
-&gt; [VarBndr Id Specificity] -&gt; [VarBndr Id Specificity]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; VarBndr Id Specificity -&gt; VarBndr Id Specificity
</span><a href="#local-6989586621681176230"><span class="hs-identifier hs-var">tidyUserTyCoVarBinder</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[VarBndr Id Specificity]
</span><a href="#local-6989586621681176236"><span class="hs-identifier hs-var">user_bndrs</span></a></span><span>
</span><span id="line-574"></span><span>          </span><span id="local-6989586621681176258"><span class="annot"><span class="annottext">to_eq_spec :: (Id, Type) -&gt; IfaceTvBndr
</span><a href="#local-6989586621681176258"><span class="hs-identifier hs-var hs-var">to_eq_spec</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681176229"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176229"><span class="hs-identifier hs-var">tv</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681176228"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176228"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Id -&gt; RuleName
</span><a href="GHC.Iface.Make.html#tidyTyVar"><span class="hs-identifier hs-var">tidyTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176229"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176254"><span class="hs-identifier hs-var">con_env2</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176228"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-575"></span><span>
</span><span id="line-576"></span><span>          </span><span class="hs-comment">-- By this point, we have tidied every universal and existential</span><span>
</span><span id="line-577"></span><span>          </span><span class="hs-comment">-- tyvar. Because of the dcUserTyCoVarBinders invariant</span><span>
</span><span id="line-578"></span><span>          </span><span class="hs-comment">-- (see Note [DataCon user type variable binders]), *every*</span><span>
</span><span id="line-579"></span><span>          </span><span class="hs-comment">-- user-written tyvar must be contained in the substitution that</span><span>
</span><span id="line-580"></span><span>          </span><span class="hs-comment">-- tidying produced. Therefore, tidying the user-written tyvars is a</span><span>
</span><span id="line-581"></span><span>          </span><span class="hs-comment">-- simple matter of looking up each variable in the substitution,</span><span>
</span><span id="line-582"></span><span>          </span><span class="hs-comment">-- which tidyTyCoVarOcc accomplishes.</span><span>
</span><span id="line-583"></span><span>          </span><span class="annot"><a href="#local-6989586621681176230"><span class="hs-identifier hs-type">tidyUserTyCoVarBinder</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#InvisTVBinder"><span class="hs-identifier hs-type">InvisTVBinder</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#InvisTVBinder"><span class="hs-identifier hs-type">InvisTVBinder</span></a></span><span>
</span><span id="line-584"></span><span>          </span><span id="local-6989586621681176230"><span class="annot"><span class="annottext">tidyUserTyCoVarBinder :: TidyEnv -&gt; VarBndr Id Specificity -&gt; VarBndr Id Specificity
</span><a href="#local-6989586621681176230"><span class="hs-identifier hs-var hs-var">tidyUserTyCoVarBinder</span></a></span></span><span> </span><span id="local-6989586621681176225"><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176225"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-type">Bndr</span></a></span><span> </span><span id="local-6989586621681176223"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176223"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621681176222"><span class="annot"><span class="annottext">Specificity
</span><a href="#local-6989586621681176222"><span class="hs-identifier hs-var">vis</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-585"></span><span>            </span><span class="annot"><span class="annottext">Id -&gt; Specificity -&gt; VarBndr Id Specificity
forall var argf. var -&gt; argf -&gt; VarBndr var argf
</span><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-var">Bndr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Id -&gt; Id
</span><a href="GHC.Core.TyCo.Tidy.html#tidyTyCoVarOcc"><span class="hs-identifier hs-var">tidyTyCoVarOcc</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176225"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176223"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Specificity
</span><a href="#local-6989586621681176222"><span class="hs-identifier hs-var">vis</span></a></span><span>
</span><span id="line-586"></span><span>
</span><span id="line-587"></span><span class="annot"><a href="GHC.Iface.Make.html#classToIfaceDecl"><span class="hs-identifier hs-type">classToIfaceDecl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#Class"><span class="hs-identifier hs-type">Class</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceDecl"><span class="hs-identifier hs-type">IfaceDecl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-588"></span><span id="classToIfaceDecl"><span class="annot"><span class="annottext">classToIfaceDecl :: TidyEnv -&gt; Class -&gt; (TidyEnv, IfaceDecl)
</span><a href="GHC.Iface.Make.html#classToIfaceDecl"><span class="hs-identifier hs-var hs-var">classToIfaceDecl</span></a></span></span><span> </span><span id="local-6989586621681176220"><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176220"><span class="hs-identifier hs-var">env</span></a></span></span><span> </span><span id="local-6989586621681176219"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176219"><span class="hs-identifier hs-var">clas</span></a></span></span><span>
</span><span id="line-589"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span><span>
</span><span id="line-590"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">IfaceClass :: Name
-&gt; [Role]
-&gt; [IfaceTyConBinder]
-&gt; [FunDep RuleName]
-&gt; IfaceClassBody
-&gt; IfaceDecl
</span><a href="GHC.Iface.Syntax.html#IfaceClass"><span class="hs-identifier hs-type">IfaceClass</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifName :: Name
</span><a href="GHC.Iface.Syntax.html#ifName"><span class="hs-identifier hs-var">ifName</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176216"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-591"></span><span>                   </span><span class="annot"><span class="annottext">ifRoles :: [Role]
</span><a href="GHC.Iface.Syntax.html#ifRoles"><span class="hs-identifier hs-var">ifRoles</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; [Role]
</span><a href="GHC.Core.TyCon.html#tyConRoles"><span class="hs-identifier hs-var">tyConRoles</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var hs-var">classTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176219"><span class="hs-identifier hs-var">clas</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-592"></span><span>                   </span><span class="annot"><span class="annottext">ifBinders :: [IfaceTyConBinder]
</span><a href="GHC.Iface.Syntax.html#ifBinders"><span class="hs-identifier hs-var">ifBinders</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[TyConBinder] -&gt; [IfaceTyConBinder]
forall vis. [VarBndr Id vis] -&gt; [VarBndr IfaceBndr vis]
</span><a href="GHC.CoreToIface.html#toIfaceTyCoVarBinders"><span class="hs-identifier hs-var">toIfaceTyCoVarBinders</span></a></span><span> </span><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621681176214"><span class="hs-identifier hs-var">tc_binders</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-593"></span><span>                   </span><span class="annot"><span class="annottext">ifBody :: IfaceClassBody
</span><a href="GHC.Iface.Syntax.html#ifBody"><span class="hs-identifier hs-var">ifBody</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceClassBody
</span><a href="#local-6989586621681176212"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-594"></span><span>                   </span><span class="annot"><span class="annottext">ifFDs :: [FunDep RuleName]
</span><a href="GHC.Iface.Syntax.html#ifFDs"><span class="hs-identifier hs-var">ifFDs</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(([Id], [Id]) -&gt; FunDep RuleName)
-&gt; [([Id], [Id])] -&gt; [FunDep RuleName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">([Id], [Id]) -&gt; FunDep RuleName
</span><a href="#local-6989586621681176210"><span class="hs-identifier hs-var">toIfaceFD</span></a></span><span> </span><span class="annot"><span class="annottext">[([Id], [Id])]
</span><a href="#local-6989586621681176209"><span class="hs-identifier hs-var">clas_fds</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-595"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-596"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176209"><span class="annot"><span class="annottext">[([Id], [Id])]
</span><a href="#local-6989586621681176209"><span class="hs-identifier hs-var">clas_fds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176208"><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176208"><span class="hs-identifier hs-var">sc_theta</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176207"><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621681176207"><span class="hs-identifier hs-var">clas_ats</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176206"><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621681176206"><span class="hs-identifier hs-var">op_stuff</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-597"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class
-&gt; ([Id], [([Id], [Id])], [Type], [Id], [ClassATItem],
    [ClassOpItem])
</span><a href="GHC.Core.Class.html#classExtraBigSig"><span class="hs-identifier hs-var">classExtraBigSig</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176219"><span class="hs-identifier hs-var">clas</span></a></span><span>
</span><span id="line-598"></span><span>    </span><span id="local-6989586621681176216"><span class="annot"><span class="annottext">tycon :: TyCon
</span><a href="#local-6989586621681176216"><span class="hs-identifier hs-var hs-var">tycon</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Class -&gt; TyCon
</span><a href="GHC.Core.Class.html#classTyCon"><span class="hs-identifier hs-var hs-var">classTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176219"><span class="hs-identifier hs-var">clas</span></a></span><span>
</span><span id="line-599"></span><span>
</span><span id="line-600"></span><span>    </span><span id="local-6989586621681176212"><span class="annot"><span class="annottext">body :: IfaceClassBody
</span><a href="#local-6989586621681176212"><span class="hs-identifier hs-var hs-var">body</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Bool
</span><a href="GHC.Core.TyCon.html#isAbstractTyCon"><span class="hs-identifier hs-var">isAbstractTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176216"><span class="hs-identifier hs-var">tycon</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceClassBody
</span><a href="GHC.Iface.Syntax.html#IfAbstractClass"><span class="hs-identifier hs-var">IfAbstractClass</span></a></span><span>
</span><span id="line-601"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-602"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfConcreteClass :: IfaceContext
-&gt; [IfaceAT]
-&gt; [IfaceClassOp]
-&gt; BooleanFormula RuleName
-&gt; IfaceClassBody
</span><a href="GHC.Iface.Syntax.html#IfConcreteClass"><span class="hs-identifier hs-type">IfConcreteClass</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-603"></span><span>                </span><span class="annot"><span class="annottext">ifClassCtxt :: IfaceContext
</span><a href="GHC.Iface.Syntax.html#ifClassCtxt"><span class="hs-identifier hs-var">ifClassCtxt</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; [Type] -&gt; IfaceContext
</span><a href="GHC.CoreToIface.html#tidyToIfaceContext"><span class="hs-identifier hs-var">tidyToIfaceContext</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span><span> </span><span class="annot"><span class="annottext">[Type]
</span><a href="#local-6989586621681176208"><span class="hs-identifier hs-var">sc_theta</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-604"></span><span>                </span><span class="annot"><span class="annottext">ifATs :: [IfaceAT]
</span><a href="GHC.Iface.Syntax.html#ifATs"><span class="hs-identifier hs-var">ifATs</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ClassATItem -&gt; IfaceAT) -&gt; [ClassATItem] -&gt; [IfaceAT]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ClassATItem -&gt; IfaceAT
</span><a href="#local-6989586621681176196"><span class="hs-identifier hs-var">toIfaceAT</span></a></span><span> </span><span class="annot"><span class="annottext">[ClassATItem]
</span><a href="#local-6989586621681176207"><span class="hs-identifier hs-var">clas_ats</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-605"></span><span>                </span><span class="annot"><span class="annottext">ifSigs :: [IfaceClassOp]
</span><a href="GHC.Iface.Syntax.html#ifSigs"><span class="hs-identifier hs-var">ifSigs</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ClassOpItem -&gt; IfaceClassOp) -&gt; [ClassOpItem] -&gt; [IfaceClassOp]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">ClassOpItem -&gt; IfaceClassOp
</span><a href="#local-6989586621681176194"><span class="hs-identifier hs-var">toIfaceClassOp</span></a></span><span> </span><span class="annot"><span class="annottext">[ClassOpItem]
</span><a href="#local-6989586621681176206"><span class="hs-identifier hs-var">op_stuff</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-606"></span><span>                </span><span class="annot"><span class="annottext">ifMinDef :: BooleanFormula RuleName
</span><a href="GHC.Iface.Syntax.html#ifMinDef"><span class="hs-identifier hs-var">ifMinDef</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; RuleName)
-&gt; BooleanFormula Name -&gt; BooleanFormula RuleName
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; RuleName
forall a. NamedThing a =&gt; a -&gt; RuleName
</span><a href="GHC.Types.Name.html#getOccFS"><span class="hs-identifier hs-var">getOccFS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Class -&gt; BooleanFormula Name
</span><a href="GHC.Core.Class.html#classMinimalDef"><span class="hs-identifier hs-var">classMinimalDef</span></a></span><span> </span><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176219"><span class="hs-identifier hs-var">clas</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-607"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-608"></span><span>
</span><span id="line-609"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681176218"><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176214"><span class="annot"><span class="annottext">[TyConBinder]
</span><a href="#local-6989586621681176214"><span class="hs-identifier hs-var">tc_binders</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; [TyConBinder] -&gt; (TidyEnv, [TyConBinder])
</span><a href="GHC.Iface.Make.html#tidyTyConBinders"><span class="hs-identifier hs-var">tidyTyConBinders</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176220"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TyCon -&gt; [TyConBinder]
</span><a href="GHC.Core.TyCon.html#tyConBinders"><span class="hs-identifier hs-var hs-var">tyConBinders</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176216"><span class="hs-identifier hs-var">tycon</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-610"></span><span>
</span><span id="line-611"></span><span>    </span><span class="annot"><a href="#local-6989586621681176196"><span class="hs-identifier hs-type">toIfaceAT</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Class.html#ClassATItem"><span class="hs-identifier hs-type">ClassATItem</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceAT"><span class="hs-identifier hs-type">IfaceAT</span></a></span><span>
</span><span id="line-612"></span><span>    </span><span id="local-6989586621681176196"><span class="annot"><span class="annottext">toIfaceAT :: ClassATItem -&gt; IfaceAT
</span><a href="#local-6989586621681176196"><span class="hs-identifier hs-var hs-var">toIfaceAT</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Class.html#ATI"><span class="hs-identifier hs-type">ATI</span></a></span><span> </span><span id="local-6989586621681176190"><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176190"><span class="hs-identifier hs-var">tc</span></a></span></span><span> </span><span id="local-6989586621681176189"><span class="annot"><span class="annottext">Maybe (Type, ATValidityInfo)
</span><a href="#local-6989586621681176189"><span class="hs-identifier hs-var">def</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-613"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceDecl -&gt; Maybe IfaceType -&gt; IfaceAT
</span><a href="GHC.Iface.Syntax.html#IfaceAT"><span class="hs-identifier hs-var">IfaceAT</span></a></span><span> </span><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681176187"><span class="hs-identifier hs-var">if_decl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Type, ATValidityInfo) -&gt; IfaceType)
-&gt; Maybe (Type, ATValidityInfo) -&gt; Maybe IfaceType
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176186"><span class="hs-identifier hs-var">env2</span></a></span><span> </span><span class="annot"><span class="annottext">(Type -&gt; IfaceType)
-&gt; ((Type, ATValidityInfo) -&gt; Type)
-&gt; (Type, ATValidityInfo)
-&gt; IfaceType
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Type, ATValidityInfo) -&gt; Type
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe (Type, ATValidityInfo)
</span><a href="#local-6989586621681176189"><span class="hs-identifier hs-var">def</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-614"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-615"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681176186"><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176186"><span class="hs-identifier hs-var">env2</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176187"><span class="annot"><span class="annottext">IfaceDecl
</span><a href="#local-6989586621681176187"><span class="hs-identifier hs-var">if_decl</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; TyCon -&gt; (TidyEnv, IfaceDecl)
</span><a href="GHC.Iface.Make.html#tyConToIfaceDecl"><span class="hs-identifier hs-var">tyConToIfaceDecl</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span><span> </span><span class="annot"><span class="annottext">TyCon
</span><a href="#local-6989586621681176190"><span class="hs-identifier hs-var">tc</span></a></span><span>
</span><span id="line-616"></span><span>
</span><span id="line-617"></span><span>    </span><span id="local-6989586621681176194"><span class="annot"><span class="annottext">toIfaceClassOp :: ClassOpItem -&gt; IfaceClassOp
</span><a href="#local-6989586621681176194"><span class="hs-identifier hs-var hs-var">toIfaceClassOp</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681176179"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176179"><span class="hs-identifier hs-var">sel_id</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176178"><span class="annot"><span class="annottext">Maybe (Name, DefMethSpec Type)
</span><a href="#local-6989586621681176178"><span class="hs-identifier hs-var">def_meth</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-618"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">sel_tyvars</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">binderVars</span><span> </span><span class="hs-identifier">tc_binders</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-619"></span><span>          </span><span class="annot"><span class="annottext">Name -&gt; IfaceType -&gt; Maybe (DefMethSpec IfaceType) -&gt; IfaceClassOp
</span><a href="GHC.Iface.Syntax.html#IfaceClassOp"><span class="hs-identifier hs-var">IfaceClassOp</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Name
forall a. NamedThing a =&gt; a -&gt; Name
</span><a href="GHC.Types.Name.html#getName"><span class="hs-identifier hs-var">getName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176179"><span class="hs-identifier hs-var">sel_id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-620"></span><span>                       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176172"><span class="hs-identifier hs-var">op_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-621"></span><span>                       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((Name, DefMethSpec Type) -&gt; DefMethSpec IfaceType)
-&gt; Maybe (Name, DefMethSpec Type) -&gt; Maybe (DefMethSpec IfaceType)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">(Name, DefMethSpec Type) -&gt; DefMethSpec IfaceType
</span><a href="#local-6989586621681176171"><span class="hs-identifier hs-var">toDmSpec</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe (Name, DefMethSpec Type)
</span><a href="#local-6989586621681176178"><span class="hs-identifier hs-var">def_meth</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-622"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-623"></span><span>                </span><span class="hs-comment">-- Be careful when splitting the type, because of things</span><span>
</span><span id="line-624"></span><span>                </span><span class="hs-comment">-- like         class Foo a where</span><span>
</span><span id="line-625"></span><span>                </span><span class="hs-comment">--                op :: (?x :: String) =&gt; a -&gt; a</span><span>
</span><span id="line-626"></span><span>                </span><span class="hs-comment">-- and          class Baz a where</span><span>
</span><span id="line-627"></span><span>                </span><span class="hs-comment">--                op :: (Ord a) =&gt; a -&gt; a</span><span>
</span><span id="line-628"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621681176175"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176175"><span class="hs-identifier hs-var">sel_tyvars</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176170"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176170"><span class="hs-identifier hs-var">rho_ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; ([Id], Type)
</span><a href="GHC.Core.Type.html#splitForAllTys"><span class="hs-identifier hs-var">splitForAllTys</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Id -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176179"><span class="hs-identifier hs-var">sel_id</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-629"></span><span>          </span><span id="local-6989586621681176172"><span class="annot"><span class="annottext">op_ty :: Type
</span><a href="#local-6989586621681176172"><span class="hs-identifier hs-var hs-var">op_ty</span></a></span></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Core.Type.html#funResultTy"><span class="hs-identifier hs-var">funResultTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176170"><span class="hs-identifier hs-var">rho_ty</span></a></span><span>
</span><span id="line-630"></span><span>
</span><span id="line-631"></span><span>    </span><span class="annot"><a href="#local-6989586621681176171"><span class="hs-identifier hs-type">toDmSpec</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#DefMethSpec"><span class="hs-identifier hs-type">DefMethSpec</span></a></span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#DefMethSpec"><span class="hs-identifier hs-type">DefMethSpec</span></a></span><span> </span><span class="annot"><a href="GHC.Iface.Type.html#IfaceType"><span class="hs-identifier hs-type">IfaceType</span></a></span><span>
</span><span id="line-632"></span><span>    </span><span id="local-6989586621681176171"><span class="annot"><span class="annottext">toDmSpec :: (Name, DefMethSpec Type) -&gt; DefMethSpec IfaceType
</span><a href="#local-6989586621681176171"><span class="hs-identifier hs-var hs-var">toDmSpec</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">DefMethSpec Type
</span><a href="GHC.Types.Basic.html#VanillaDM"><span class="hs-identifier hs-var">VanillaDM</span></a></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DefMethSpec IfaceType
forall ty. DefMethSpec ty
</span><a href="GHC.Types.Basic.html#VanillaDM"><span class="hs-identifier hs-var">VanillaDM</span></a></span><span>
</span><span id="line-633"></span><span>    </span><span class="annot"><a href="#local-6989586621681176171"><span class="hs-identifier hs-var">toDmSpec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#GenericDM"><span class="hs-identifier hs-type">GenericDM</span></a></span><span> </span><span id="local-6989586621681176165"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176165"><span class="hs-identifier hs-var">dm_ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType -&gt; DefMethSpec IfaceType
forall ty. ty -&gt; DefMethSpec ty
</span><a href="GHC.Types.Basic.html#GenericDM"><span class="hs-identifier hs-var">GenericDM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#tidyToIfaceType"><span class="hs-identifier hs-var">tidyToIfaceType</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176165"><span class="hs-identifier hs-var">dm_ty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-634"></span><span>
</span><span id="line-635"></span><span>    </span><span id="local-6989586621681176210"><span class="annot"><span class="annottext">toIfaceFD :: ([Id], [Id]) -&gt; FunDep RuleName
</span><a href="#local-6989586621681176210"><span class="hs-identifier hs-var hs-var">toIfaceFD</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681176164"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176164"><span class="hs-identifier hs-var">tvs1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176163"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176163"><span class="hs-identifier hs-var">tvs2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Id -&gt; RuleName) -&gt; [Id] -&gt; [RuleName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Id -&gt; RuleName
</span><a href="GHC.Iface.Make.html#tidyTyVar"><span class="hs-identifier hs-var">tidyTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176164"><span class="hs-identifier hs-var">tvs1</span></a></span><span>
</span><span id="line-636"></span><span>                             </span><span class="hs-special">,</span><span class="annot"><span class="annottext">(Id -&gt; RuleName) -&gt; [Id] -&gt; [RuleName]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv -&gt; Id -&gt; RuleName
</span><a href="GHC.Iface.Make.html#tidyTyVar"><span class="hs-identifier hs-var">tidyTyVar</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176218"><span class="hs-identifier hs-var">env1</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176163"><span class="hs-identifier hs-var">tvs2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-637"></span><span>
</span><span id="line-638"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-639"></span><span>
</span><span id="line-640"></span><span class="annot"><a href="GHC.Iface.Make.html#tidyTyConBinder"><span class="hs-identifier hs-type">tidyTyConBinder</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyConBinder"><span class="hs-identifier hs-type">TyConBinder</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.TyCon.html#TyConBinder"><span class="hs-identifier hs-type">TyConBinder</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-641"></span><span class="hs-comment">-- If the type variable &quot;binder&quot; is in scope, don't re-bind it</span><span>
</span><span id="line-642"></span><span class="hs-comment">-- In a class decl, for example, the ATD binders mention</span><span>
</span><span id="line-643"></span><span class="hs-comment">-- (amd must mention) the class tyvars</span><span>
</span><span id="line-644"></span><span id="tidyTyConBinder"><span class="annot"><span class="annottext">tidyTyConBinder :: TidyEnv -&gt; TyConBinder -&gt; (TidyEnv, TyConBinder)
</span><a href="GHC.Iface.Make.html#tidyTyConBinder"><span class="hs-identifier hs-var hs-var">tidyTyConBinder</span></a></span></span><span> </span><span id="local-6989586621681176161"><span class="annot"><span class="annottext">env :: TidyEnv
</span><a href="#local-6989586621681176161"><span class="hs-identifier hs-var">env</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyOccEnv
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176160"><span class="annot"><span class="annottext">VarEnv Id
</span><a href="#local-6989586621681176160"><span class="hs-identifier hs-var">subst</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681176159"><span class="annot"><span class="annottext">tvb :: TyConBinder
</span><a href="#local-6989586621681176159"><span class="hs-identifier hs-var">tvb</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-type">Bndr</span></a></span><span> </span><span id="local-6989586621681176158"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176158"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span id="local-6989586621681176157"><span class="annot"><span class="annottext">TyConBndrVis
</span><a href="#local-6989586621681176157"><span class="hs-identifier hs-var">vis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-645"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VarEnv Id -&gt; Id -&gt; Maybe Id
forall a. VarEnv a -&gt; Id -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">VarEnv Id
</span><a href="#local-6989586621681176160"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176158"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-646"></span><span>     </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176155"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176155"><span class="hs-identifier hs-var">tv'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176161"><span class="hs-identifier hs-var">env</span></a></span><span class="hs-special">,</span><span>  </span><span class="annot"><span class="annottext">Id -&gt; TyConBndrVis -&gt; TyConBinder
forall var argf. var -&gt; argf -&gt; VarBndr var argf
</span><a href="GHC.Types.Var.html#Bndr"><span class="hs-identifier hs-var">Bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176155"><span class="hs-identifier hs-var">tv'</span></a></span><span> </span><span class="annot"><span class="annottext">TyConBndrVis
</span><a href="#local-6989586621681176157"><span class="hs-identifier hs-var">vis</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-647"></span><span>     </span><span class="annot"><span class="annottext">Maybe Id
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; TyConBinder -&gt; (TidyEnv, TyConBinder)
forall vis. TidyEnv -&gt; VarBndr Id vis -&gt; (TidyEnv, VarBndr Id vis)
</span><a href="GHC.Core.TyCo.Tidy.html#tidyTyCoVarBinder"><span class="hs-identifier hs-var">tidyTyCoVarBinder</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv
</span><a href="#local-6989586621681176161"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="annot"><span class="annottext">TyConBinder
</span><a href="#local-6989586621681176159"><span class="hs-identifier hs-var">tvb</span></a></span><span>
</span><span id="line-648"></span><span>
</span><span id="line-649"></span><span class="annot"><a href="GHC.Iface.Make.html#tidyTyConBinders"><span class="hs-identifier hs-type">tidyTyConBinders</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCon.html#TyConBinder"><span class="hs-identifier hs-type">TyConBinder</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.TyCon.html#TyConBinder"><span class="hs-identifier hs-type">TyConBinder</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-650"></span><span id="tidyTyConBinders"><span class="annot"><span class="annottext">tidyTyConBinders :: TidyEnv -&gt; [TyConBinder] -&gt; (TidyEnv, [TyConBinder])
</span><a href="GHC.Iface.Make.html#tidyTyConBinders"><span class="hs-identifier hs-var hs-var">tidyTyConBinders</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(TidyEnv -&gt; TyConBinder -&gt; (TidyEnv, TyConBinder))
-&gt; TidyEnv -&gt; [TyConBinder] -&gt; (TidyEnv, [TyConBinder])
forall (t :: * -&gt; *) s a b.
Traversable t =&gt;
(s -&gt; a -&gt; (s, b)) -&gt; s -&gt; t a -&gt; (s, t b)
</span><a href="../../base/src/Data.Traversable.html#mapAccumL"><span class="hs-identifier hs-var">mapAccumL</span></a></span><span> </span><span class="annot"><span class="annottext">TidyEnv -&gt; TyConBinder -&gt; (TidyEnv, TyConBinder)
</span><a href="GHC.Iface.Make.html#tidyTyConBinder"><span class="hs-identifier hs-var">tidyTyConBinder</span></a></span><span>
</span><span id="line-651"></span><span>
</span><span id="line-652"></span><span class="annot"><a href="GHC.Iface.Make.html#tidyTyVar"><span class="hs-identifier hs-type">tidyTyVar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Var.Env.html#TidyEnv"><span class="hs-identifier hs-type">TidyEnv</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#TyVar"><span class="hs-identifier hs-type">TyVar</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html#FastString"><span class="hs-identifier hs-type">FastString</span></a></span><span>
</span><span id="line-653"></span><span id="tidyTyVar"><span class="annot"><span class="annottext">tidyTyVar :: TidyEnv -&gt; Id -&gt; RuleName
</span><a href="GHC.Iface.Make.html#tidyTyVar"><span class="hs-identifier hs-var hs-var">tidyTyVar</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">TidyOccEnv
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681176151"><span class="annot"><span class="annottext">VarEnv Id
</span><a href="#local-6989586621681176151"><span class="hs-identifier hs-var">subst</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681176150"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176150"><span class="hs-identifier hs-var">tv</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; RuleName
</span><a href="GHC.CoreToIface.html#toIfaceTyVar"><span class="hs-identifier hs-var">toIfaceTyVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VarEnv Id -&gt; Id -&gt; Maybe Id
forall a. VarEnv a -&gt; Id -&gt; Maybe a
</span><a href="GHC.Types.Var.Env.html#lookupVarEnv"><span class="hs-identifier hs-var">lookupVarEnv</span></a></span><span> </span><span class="annot"><span class="annottext">VarEnv Id
</span><a href="#local-6989586621681176151"><span class="hs-identifier hs-var">subst</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176150"><span class="hs-identifier hs-var">tv</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Id -&gt; Id -&gt; Id
forall a. Maybe a -&gt; a -&gt; a
</span><a href="GHC.Data.Maybe.html#orElse"><span class="hs-operator hs-var">`orElse`</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176150"><span class="hs-identifier hs-var">tv</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-654"></span><span>
</span><span id="line-655"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-656"></span><span class="annot"><a href="GHC.Iface.Make.html#instanceToIfaceInst"><span class="hs-identifier hs-type">instanceToIfaceInst</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.InstEnv.html#ClsInst"><span class="hs-identifier hs-type">ClsInst</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceClsInst"><span class="hs-identifier hs-type">IfaceClsInst</span></a></span><span>
</span><span id="line-657"></span><span id="instanceToIfaceInst"><span class="annot"><span class="annottext">instanceToIfaceInst :: ClsInst -&gt; IfaceClsInst
</span><a href="GHC.Iface.Make.html#instanceToIfaceInst"><span class="hs-identifier hs-var hs-var">instanceToIfaceInst</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.InstEnv.html#ClsInst"><span class="hs-identifier hs-type">ClsInst</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">is_dfun :: ClsInst -&gt; Id
</span><a href="GHC.Core.InstEnv.html#is_dfun"><span class="hs-identifier hs-var">is_dfun</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176145"><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176145"><span class="hs-identifier hs-var">dfun_id</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">is_flag :: ClsInst -&gt; OverlapFlag
</span><a href="GHC.Core.InstEnv.html#is_flag"><span class="hs-identifier hs-var">is_flag</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176143"><span class="annot"><span class="annottext">OverlapFlag
</span><a href="#local-6989586621681176143"><span class="hs-identifier hs-var">oflag</span></a></span></span><span>
</span><span id="line-658"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">is_cls_nm :: ClsInst -&gt; Name
</span><a href="GHC.Core.InstEnv.html#is_cls_nm"><span class="hs-identifier hs-var">is_cls_nm</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176141"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176141"><span class="hs-identifier hs-var">cls_name</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">is_cls :: ClsInst -&gt; Class
</span><a href="GHC.Core.InstEnv.html#is_cls"><span class="hs-identifier hs-var">is_cls</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176139"><span class="annot"><span class="annottext">Class
</span><a href="#local-6989586621681176139"><span class="hs-identifier hs-var">cls</span></a></span></span><span>
</span><span id="line-659"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">is_tcs :: ClsInst -&gt; [Maybe Name]
</span><a href="GHC.Core.InstEnv.html#is_tcs"><span class="hs-identifier hs-var">is_tcs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176137"><span class="annot"><span class="annottext">[Maybe Name]
</span><a href="#local-6989586621681176137"><span class="hs-identifier hs-var">mb_tcs</span></a></span></span><span>
</span><span id="line-660"></span><span>                             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">is_orphan :: ClsInst -&gt; IsOrphan
</span><a href="GHC.Core.InstEnv.html#is_orphan"><span class="hs-identifier hs-var">is_orphan</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176135"><span class="annot"><span class="annottext">IsOrphan
</span><a href="#local-6989586621681176135"><span class="hs-identifier hs-var">orph</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-661"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">cls_name</span><span> </span><span class="hs-operator">==</span><span> </span><span class="hs-identifier">className</span><span> </span><span class="hs-identifier">cls</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-662"></span><span>    </span><span class="annot"><span class="annottext">IfaceClsInst :: Name
-&gt; [Maybe IfaceTyCon]
-&gt; Name
-&gt; OverlapFlag
-&gt; IsOrphan
-&gt; IfaceClsInst
</span><a href="GHC.Iface.Syntax.html#IfaceClsInst"><span class="hs-identifier hs-type">IfaceClsInst</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifDFun :: Name
</span><a href="GHC.Iface.Syntax.html#ifDFun"><span class="hs-identifier hs-var">ifDFun</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176132"><span class="hs-identifier hs-var">dfun_name</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-663"></span><span>                </span><span class="annot"><span class="annottext">ifOFlag :: OverlapFlag
</span><a href="GHC.Iface.Syntax.html#ifOFlag"><span class="hs-identifier hs-var">ifOFlag</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OverlapFlag
</span><a href="#local-6989586621681176143"><span class="hs-identifier hs-var">oflag</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-664"></span><span>                </span><span class="annot"><span class="annottext">ifInstCls :: Name
</span><a href="GHC.Iface.Syntax.html#ifInstCls"><span class="hs-identifier hs-var">ifInstCls</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176141"><span class="hs-identifier hs-var">cls_name</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-665"></span><span>                </span><span class="annot"><span class="annottext">ifInstTys :: [Maybe IfaceTyCon]
</span><a href="GHC.Iface.Syntax.html#ifInstTys"><span class="hs-identifier hs-var">ifInstTys</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe Name -&gt; Maybe IfaceTyCon)
-&gt; [Maybe Name] -&gt; [Maybe IfaceTyCon]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name -&gt; Maybe IfaceTyCon
</span><a href="#local-6989586621681176128"><span class="hs-identifier hs-var">do_rough</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe Name]
</span><a href="#local-6989586621681176137"><span class="hs-identifier hs-var">mb_tcs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-666"></span><span>                </span><span class="annot"><span class="annottext">ifInstOrph :: IsOrphan
</span><a href="GHC.Iface.Syntax.html#ifInstOrph"><span class="hs-identifier hs-var">ifInstOrph</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IsOrphan
</span><a href="#local-6989586621681176135"><span class="hs-identifier hs-var">orph</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-667"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-668"></span><span>    </span><span id="local-6989586621681176128"><span class="annot"><span class="annottext">do_rough :: Maybe Name -&gt; Maybe IfaceTyCon
</span><a href="#local-6989586621681176128"><span class="hs-identifier hs-var hs-var">do_rough</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Name
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe IfaceTyCon
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-669"></span><span>    </span><span class="annot"><a href="#local-6989586621681176128"><span class="hs-identifier hs-var">do_rough</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176126"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176126"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTyCon -&gt; Maybe IfaceTyCon
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfaceTyCon
</span><a href="GHC.CoreToIface.html#toIfaceTyCon_name"><span class="hs-identifier hs-var">toIfaceTyCon_name</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176126"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-670"></span><span>
</span><span id="line-671"></span><span>    </span><span id="local-6989586621681176132"><span class="annot"><span class="annottext">dfun_name :: Name
</span><a href="#local-6989586621681176132"><span class="hs-identifier hs-var hs-var">dfun_name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Id -&gt; Name
</span><a href="GHC.Types.Id.html#idName"><span class="hs-identifier hs-var">idName</span></a></span><span> </span><span class="annot"><span class="annottext">Id
</span><a href="#local-6989586621681176145"><span class="hs-identifier hs-var">dfun_id</span></a></span><span>
</span><span id="line-672"></span><span>
</span><span id="line-673"></span><span>
</span><span id="line-674"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-675"></span><span class="annot"><a href="GHC.Iface.Make.html#famInstToIfaceFamInst"><span class="hs-identifier hs-type">famInstToIfaceFamInst</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInst"><span class="hs-identifier hs-type">FamInst</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceFamInst"><span class="hs-identifier hs-type">IfaceFamInst</span></a></span><span>
</span><span id="line-676"></span><span id="famInstToIfaceFamInst"><span class="annot"><span class="annottext">famInstToIfaceFamInst :: FamInst -&gt; IfaceFamInst
</span><a href="GHC.Iface.Make.html#famInstToIfaceFamInst"><span class="hs-identifier hs-var hs-var">famInstToIfaceFamInst</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.FamInstEnv.html#FamInst"><span class="hs-identifier hs-type">FamInst</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">fi_axiom :: FamInst -&gt; CoAxiom Unbranched
</span><a href="GHC.Core.FamInstEnv.html#fi_axiom"><span class="hs-identifier hs-var">fi_axiom</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176121"><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621681176121"><span class="hs-identifier hs-var">axiom</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-677"></span><span>                                 </span><span class="annot"><span class="annottext">fi_fam :: FamInst -&gt; Name
</span><a href="GHC.Core.FamInstEnv.html#fi_fam"><span class="hs-identifier hs-var">fi_fam</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176119"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176119"><span class="hs-identifier hs-var">fam</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-678"></span><span>                                 </span><span class="annot"><span class="annottext">fi_tcs :: FamInst -&gt; [Maybe Name]
</span><a href="GHC.Core.FamInstEnv.html#fi_tcs"><span class="hs-identifier hs-var">fi_tcs</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176117"><span class="annot"><span class="annottext">[Maybe Name]
</span><a href="#local-6989586621681176117"><span class="hs-identifier hs-var">roughs</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-679"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceFamInst :: Name -&gt; [Maybe IfaceTyCon] -&gt; Name -&gt; IsOrphan -&gt; IfaceFamInst
</span><a href="GHC.Iface.Syntax.html#IfaceFamInst"><span class="hs-identifier hs-type">IfaceFamInst</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifFamInstAxiom :: Name
</span><a href="GHC.Iface.Syntax.html#ifFamInstAxiom"><span class="hs-identifier hs-var">ifFamInstAxiom</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched -&gt; Name
forall (br :: BranchFlag). CoAxiom br -&gt; Name
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomName"><span class="hs-identifier hs-var">coAxiomName</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621681176121"><span class="hs-identifier hs-var">axiom</span></a></span><span>
</span><span id="line-680"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifFamInstFam :: Name
</span><a href="GHC.Iface.Syntax.html#ifFamInstFam"><span class="hs-identifier hs-var">ifFamInstFam</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176119"><span class="hs-identifier hs-var">fam</span></a></span><span>
</span><span id="line-681"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifFamInstTys :: [Maybe IfaceTyCon]
</span><a href="GHC.Iface.Syntax.html#ifFamInstTys"><span class="hs-identifier hs-var">ifFamInstTys</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Maybe Name -&gt; Maybe IfaceTyCon)
-&gt; [Maybe Name] -&gt; [Maybe IfaceTyCon]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Name -&gt; Maybe IfaceTyCon
</span><a href="#local-6989586621681176113"><span class="hs-identifier hs-var">do_rough</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe Name]
</span><a href="#local-6989586621681176117"><span class="hs-identifier hs-var">roughs</span></a></span><span>
</span><span id="line-682"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifFamInstOrph :: IsOrphan
</span><a href="GHC.Iface.Syntax.html#ifFamInstOrph"><span class="hs-identifier hs-var">ifFamInstOrph</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IsOrphan
</span><a href="#local-6989586621681176111"><span class="hs-identifier hs-var">orph</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-683"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-684"></span><span>    </span><span id="local-6989586621681176113"><span class="annot"><span class="annottext">do_rough :: Maybe Name -&gt; Maybe IfaceTyCon
</span><a href="#local-6989586621681176113"><span class="hs-identifier hs-var hs-var">do_rough</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Name
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe IfaceTyCon
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-685"></span><span>    </span><span class="annot"><a href="#local-6989586621681176113"><span class="hs-identifier hs-var">do_rough</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681176110"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176110"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceTyCon -&gt; Maybe IfaceTyCon
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; IfaceTyCon
</span><a href="GHC.CoreToIface.html#toIfaceTyCon_name"><span class="hs-identifier hs-var">toIfaceTyCon_name</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176110"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-686"></span><span>
</span><span id="line-687"></span><span>    </span><span id="local-6989586621681176109"><span class="annot"><span class="annottext">fam_decl :: Name
</span><a href="#local-6989586621681176109"><span class="hs-identifier hs-var hs-var">fam_decl</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">TyCon -&gt; Name
</span><a href="GHC.Core.TyCon.html#tyConName"><span class="hs-identifier hs-var hs-var">tyConName</span></a></span><span> </span><span class="annot"><span class="annottext">(TyCon -&gt; Name) -&gt; TyCon -&gt; Name
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched -&gt; TyCon
forall (br :: BranchFlag). CoAxiom br -&gt; TyCon
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomTyCon"><span class="hs-identifier hs-var">coAxiomTyCon</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621681176121"><span class="hs-identifier hs-var">axiom</span></a></span><span>
</span><span id="line-688"></span><span>    </span><span id="local-6989586621681176105"><span class="annot"><span class="annottext">mod :: Module
</span><a href="#local-6989586621681176105"><span class="hs-identifier hs-var hs-var">mod</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">isExternalName</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">coAxiomName</span><span> </span><span class="hs-identifier">axiom</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-689"></span><span>          </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Name -&gt; Module
Name -&gt; Module
</span><a href="GHC.Types.Name.html#nameModule"><span class="hs-identifier hs-var">nameModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoAxiom Unbranched -&gt; Name
forall (br :: BranchFlag). CoAxiom br -&gt; Name
</span><a href="GHC.Core.Coercion.Axiom.html#coAxiomName"><span class="hs-identifier hs-var">coAxiomName</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621681176121"><span class="hs-identifier hs-var">axiom</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-690"></span><span>    </span><span id="local-6989586621681176102"><span class="annot"><span class="annottext">is_local :: Name -&gt; Bool
</span><a href="#local-6989586621681176102"><span class="hs-identifier hs-var hs-var">is_local</span></a></span></span><span> </span><span id="local-6989586621681176101"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176101"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Module -&gt; Name -&gt; Bool
</span><a href="GHC.Types.Name.html#nameIsLocalOrFrom"><span class="hs-identifier hs-var">nameIsLocalOrFrom</span></a></span><span> </span><span class="annot"><span class="annottext">Module
</span><a href="#local-6989586621681176105"><span class="hs-identifier hs-var">mod</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176101"><span class="hs-identifier hs-var">name</span></a></span><span>
</span><span id="line-691"></span><span>
</span><span id="line-692"></span><span>    </span><span id="local-6989586621681176100"><span class="annot"><span class="annottext">lhs_names :: NameSet
</span><a href="#local-6989586621681176100"><span class="hs-identifier hs-var hs-var">lhs_names</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Name -&gt; Bool) -&gt; NameSet -&gt; NameSet
</span><a href="GHC.Types.Name.Set.html#filterNameSet"><span class="hs-identifier hs-var">filterNameSet</span></a></span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621681176102"><span class="hs-identifier hs-var">is_local</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoAxiom Unbranched -&gt; NameSet
forall (br :: BranchFlag). CoAxiom br -&gt; NameSet
</span><a href="GHC.Core.FVs.html#orphNamesOfCoCon"><span class="hs-identifier hs-var">orphNamesOfCoCon</span></a></span><span> </span><span class="annot"><span class="annottext">CoAxiom Unbranched
</span><a href="#local-6989586621681176121"><span class="hs-identifier hs-var">axiom</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-693"></span><span>
</span><span id="line-694"></span><span>    </span><span id="local-6989586621681176111"><span class="annot"><span class="annottext">orph :: IsOrphan
</span><a href="#local-6989586621681176111"><span class="hs-identifier hs-var hs-var">orph</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Name -&gt; Bool
</span><a href="#local-6989586621681176102"><span class="hs-identifier hs-var">is_local</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176109"><span class="hs-identifier hs-var">fam_decl</span></a></span><span>
</span><span id="line-695"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OccName -&gt; IsOrphan
</span><a href="GHC.Core.html#NotOrphan"><span class="hs-identifier hs-var">NotOrphan</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; OccName
</span><a href="GHC.Types.Name.html#nameOccName"><span class="hs-identifier hs-var">nameOccName</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176109"><span class="hs-identifier hs-var">fam_decl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-696"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-697"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NameSet -&gt; IsOrphan
</span><a href="GHC.Core.html#chooseOrphanAnchor"><span class="hs-identifier hs-var">chooseOrphanAnchor</span></a></span><span> </span><span class="annot"><span class="annottext">NameSet
</span><a href="#local-6989586621681176100"><span class="hs-identifier hs-var">lhs_names</span></a></span><span>
</span><span id="line-698"></span><span>
</span><span id="line-699"></span><span class="hs-comment">--------------------------</span><span>
</span><span id="line-700"></span><span class="annot"><a href="GHC.Iface.Make.html#coreRuleToIfaceRule"><span class="hs-identifier hs-type">coreRuleToIfaceRule</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreRule"><span class="hs-identifier hs-type">CoreRule</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceRule"><span class="hs-identifier hs-type">IfaceRule</span></a></span><span>
</span><span id="line-701"></span><span id="coreRuleToIfaceRule"><span class="annot"><span class="annottext">coreRuleToIfaceRule :: CoreRule -&gt; IfaceRule
</span><a href="GHC.Iface.Make.html#coreRuleToIfaceRule"><span class="hs-identifier hs-var hs-var">coreRuleToIfaceRule</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#BuiltinRule"><span class="hs-identifier hs-type">BuiltinRule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_fn :: CoreRule -&gt; Name
</span><a href="GHC.Core.html#ru_fn"><span class="hs-identifier hs-var">ru_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176093"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176093"><span class="hs-identifier hs-var">fn</span></a></span></span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-702"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc -&gt; IfaceRule -&gt; IfaceRule
forall a. String -&gt; SDoc -&gt; a -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprTrace"><span class="hs-identifier hs-var">pprTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;toHsRule: builtin&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Name -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176093"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(IfaceRule -&gt; IfaceRule) -&gt; IfaceRule -&gt; IfaceRule
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-703"></span><span>    </span><span class="annot"><span class="annottext">Name -&gt; IfaceRule
</span><a href="GHC.Iface.Make.html#bogusIfaceRule"><span class="hs-identifier hs-var">bogusIfaceRule</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176093"><span class="hs-identifier hs-var">fn</span></a></span><span>
</span><span id="line-704"></span><span>
</span><span id="line-705"></span><span class="annot"><a href="GHC.Iface.Make.html#coreRuleToIfaceRule"><span class="hs-identifier hs-var">coreRuleToIfaceRule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rule"><span class="hs-identifier hs-type">Rule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ru_name :: CoreRule -&gt; RuleName
</span><a href="GHC.Core.html#ru_name"><span class="hs-identifier hs-var">ru_name</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176088"><span class="annot"><span class="annottext">RuleName
</span><a href="#local-6989586621681176088"><span class="hs-identifier hs-var">name</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_fn :: CoreRule -&gt; Name
</span><a href="GHC.Core.html#ru_fn"><span class="hs-identifier hs-var">ru_fn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176087"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176087"><span class="hs-identifier hs-var">fn</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-706"></span><span>                            </span><span class="annot"><span class="annottext">ru_act :: CoreRule -&gt; Activation
</span><a href="GHC.Core.html#ru_act"><span class="hs-identifier hs-var">ru_act</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176085"><span class="annot"><span class="annottext">Activation
</span><a href="#local-6989586621681176085"><span class="hs-identifier hs-var">act</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_bndrs :: CoreRule -&gt; [Id]
</span><a href="GHC.Core.html#ru_bndrs"><span class="hs-identifier hs-var">ru_bndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176083"><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176083"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-707"></span><span>                            </span><span class="annot"><span class="annottext">ru_args :: CoreRule -&gt; [CoreExpr]
</span><a href="GHC.Core.html#ru_args"><span class="hs-identifier hs-var">ru_args</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176081"><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681176081"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_rhs :: CoreRule -&gt; CoreExpr
</span><a href="GHC.Core.html#ru_rhs"><span class="hs-identifier hs-var">ru_rhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176079"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681176079"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-708"></span><span>                            </span><span class="annot"><span class="annottext">ru_orphan :: CoreRule -&gt; IsOrphan
</span><a href="GHC.Core.html#ru_orphan"><span class="hs-identifier hs-var">ru_orphan</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176077"><span class="annot"><span class="annottext">IsOrphan
</span><a href="#local-6989586621681176077"><span class="hs-identifier hs-var">orph</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ru_auto :: CoreRule -&gt; Bool
</span><a href="GHC.Core.html#ru_auto"><span class="hs-identifier hs-var">ru_auto</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681176075"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176075"><span class="hs-identifier hs-var">auto</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-709"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceRule :: RuleName
-&gt; Activation
-&gt; [IfaceBndr]
-&gt; Name
-&gt; [IfaceExpr]
-&gt; IfaceExpr
-&gt; Bool
-&gt; IsOrphan
-&gt; IfaceRule
</span><a href="GHC.Iface.Syntax.html#IfaceRule"><span class="hs-identifier hs-type">IfaceRule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifRuleName :: RuleName
</span><a href="GHC.Iface.Syntax.html#ifRuleName"><span class="hs-identifier hs-var">ifRuleName</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RuleName
</span><a href="#local-6989586621681176088"><span class="hs-identifier hs-var">name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifActivation :: Activation
</span><a href="GHC.Iface.Syntax.html#ifActivation"><span class="hs-identifier hs-var">ifActivation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Activation
</span><a href="#local-6989586621681176085"><span class="hs-identifier hs-var">act</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-710"></span><span>                </span><span class="annot"><span class="annottext">ifRuleBndrs :: [IfaceBndr]
</span><a href="GHC.Iface.Syntax.html#ifRuleBndrs"><span class="hs-identifier hs-var">ifRuleBndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Id -&gt; IfaceBndr) -&gt; [Id] -&gt; [IfaceBndr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Id -&gt; IfaceBndr
</span><a href="GHC.CoreToIface.html#toIfaceBndr"><span class="hs-identifier hs-var">toIfaceBndr</span></a></span><span> </span><span class="annot"><span class="annottext">[Id]
</span><a href="#local-6989586621681176083"><span class="hs-identifier hs-var">bndrs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-711"></span><span>                </span><span class="annot"><span class="annottext">ifRuleHead :: Name
</span><a href="GHC.Iface.Syntax.html#ifRuleHead"><span class="hs-identifier hs-var">ifRuleHead</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176087"><span class="hs-identifier hs-var">fn</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-712"></span><span>                </span><span class="annot"><span class="annottext">ifRuleArgs :: [IfaceExpr]
</span><a href="GHC.Iface.Syntax.html#ifRuleArgs"><span class="hs-identifier hs-var">ifRuleArgs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExpr -&gt; IfaceExpr) -&gt; [CoreExpr] -&gt; [IfaceExpr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; IfaceExpr
</span><a href="#local-6989586621681176069"><span class="hs-identifier hs-var">do_arg</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExpr]
</span><a href="#local-6989586621681176081"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-713"></span><span>                </span><span class="annot"><span class="annottext">ifRuleRhs :: IfaceExpr
</span><a href="GHC.Iface.Syntax.html#ifRuleRhs"><span class="hs-identifier hs-var">ifRuleRhs</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; IfaceExpr
</span><a href="GHC.CoreToIface.html#toIfaceExpr"><span class="hs-identifier hs-var">toIfaceExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681176079"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-714"></span><span>                </span><span class="annot"><span class="annottext">ifRuleAuto :: Bool
</span><a href="GHC.Iface.Syntax.html#ifRuleAuto"><span class="hs-identifier hs-var">ifRuleAuto</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681176075"><span class="hs-identifier hs-var">auto</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-715"></span><span>                </span><span class="annot"><span class="annottext">ifRuleOrph :: IsOrphan
</span><a href="GHC.Iface.Syntax.html#ifRuleOrph"><span class="hs-identifier hs-var">ifRuleOrph</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IsOrphan
</span><a href="#local-6989586621681176077"><span class="hs-identifier hs-var">orph</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-716"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-717"></span><span>        </span><span class="hs-comment">-- For type args we must remove synonyms from the outermost</span><span>
</span><span id="line-718"></span><span>        </span><span class="hs-comment">-- level.  Reason: so that when we read it back in we'll</span><span>
</span><span id="line-719"></span><span>        </span><span class="hs-comment">-- construct the same ru_rough field as we have right now;</span><span>
</span><span id="line-720"></span><span>        </span><span class="hs-comment">-- see tcIfaceRule</span><span>
</span><span id="line-721"></span><span>    </span><span id="local-6989586621681176069"><span class="annot"><span class="annottext">do_arg :: CoreExpr -&gt; IfaceExpr
</span><a href="#local-6989586621681176069"><span class="hs-identifier hs-var hs-var">do_arg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span id="local-6989586621681176063"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176063"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceType -&gt; IfaceExpr
</span><a href="GHC.Iface.Syntax.html#IfaceType"><span class="hs-identifier hs-var">IfaceType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; IfaceType
</span><a href="GHC.CoreToIface.html#toIfaceType"><span class="hs-identifier hs-var">toIfaceType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type -&gt; Type
</span><a href="GHC.Tc.Utils.TcType.html#deNoteType"><span class="hs-identifier hs-var">deNoteType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621681176063"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-722"></span><span>    </span><span class="annot"><a href="#local-6989586621681176069"><span class="hs-identifier hs-var">do_arg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Coercion"><span class="hs-identifier hs-type">Coercion</span></a></span><span> </span><span id="local-6989586621681176059"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621681176059"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceCoercion -&gt; IfaceExpr
</span><a href="GHC.Iface.Syntax.html#IfaceCo"><span class="hs-identifier hs-var">IfaceCo</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; IfaceCoercion
</span><a href="GHC.CoreToIface.html#toIfaceCoercion"><span class="hs-identifier hs-var">toIfaceCoercion</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621681176059"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-723"></span><span>    </span><span class="annot"><a href="#local-6989586621681176069"><span class="hs-identifier hs-var">do_arg</span></a></span><span> </span><span id="local-6989586621681176056"><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681176056"><span class="hs-identifier hs-var">arg</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExpr -&gt; IfaceExpr
</span><a href="GHC.CoreToIface.html#toIfaceExpr"><span class="hs-identifier hs-var">toIfaceExpr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExpr
</span><a href="#local-6989586621681176056"><span class="hs-identifier hs-var">arg</span></a></span><span>
</span><span id="line-724"></span><span>
</span><span id="line-725"></span><span class="annot"><a href="GHC.Iface.Make.html#bogusIfaceRule"><span class="hs-identifier hs-type">bogusIfaceRule</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Name.html#Name"><span class="hs-identifier hs-type">Name</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Iface.Syntax.html#IfaceRule"><span class="hs-identifier hs-type">IfaceRule</span></a></span><span>
</span><span id="line-726"></span><span id="bogusIfaceRule"><span class="annot"><span class="annottext">bogusIfaceRule :: Name -&gt; IfaceRule
</span><a href="GHC.Iface.Make.html#bogusIfaceRule"><span class="hs-identifier hs-var hs-var">bogusIfaceRule</span></a></span></span><span> </span><span id="local-6989586621681176055"><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176055"><span class="hs-identifier hs-var">id_name</span></a></span></span><span>
</span><span id="line-727"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IfaceRule :: RuleName
-&gt; Activation
-&gt; [IfaceBndr]
-&gt; Name
-&gt; [IfaceExpr]
-&gt; IfaceExpr
-&gt; Bool
-&gt; IsOrphan
-&gt; IfaceRule
</span><a href="GHC.Iface.Syntax.html#IfaceRule"><span class="hs-identifier hs-type">IfaceRule</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ifRuleName :: RuleName
</span><a href="GHC.Iface.Syntax.html#ifRuleName"><span class="hs-identifier hs-var">ifRuleName</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; RuleName
</span><a href="GHC.Data.FastString.html#fsLit"><span class="hs-identifier hs-var">fsLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;bogus&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifActivation :: Activation
</span><a href="GHC.Iface.Syntax.html#ifActivation"><span class="hs-identifier hs-var">ifActivation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Activation
</span><a href="GHC.Types.Basic.html#NeverActive"><span class="hs-identifier hs-var">NeverActive</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-728"></span><span>        </span><span class="annot"><span class="annottext">ifRuleBndrs :: [IfaceBndr]
</span><a href="GHC.Iface.Syntax.html#ifRuleBndrs"><span class="hs-identifier hs-var">ifRuleBndrs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifRuleHead :: Name
</span><a href="GHC.Iface.Syntax.html#ifRuleHead"><span class="hs-identifier hs-var">ifRuleHead</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176055"><span class="hs-identifier hs-var">id_name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifRuleArgs :: [IfaceExpr]
</span><a href="GHC.Iface.Syntax.html#ifRuleArgs"><span class="hs-identifier hs-var">ifRuleArgs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-729"></span><span>        </span><span class="annot"><span class="annottext">ifRuleRhs :: IfaceExpr
</span><a href="GHC.Iface.Syntax.html#ifRuleRhs"><span class="hs-identifier hs-var">ifRuleRhs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Name -&gt; IfaceExpr
</span><a href="GHC.Iface.Syntax.html#IfaceExt"><span class="hs-identifier hs-var">IfaceExt</span></a></span><span> </span><span class="annot"><span class="annottext">Name
</span><a href="#local-6989586621681176055"><span class="hs-identifier hs-var">id_name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ifRuleOrph :: IsOrphan
</span><a href="GHC.Iface.Syntax.html#ifRuleOrph"><span class="hs-identifier hs-var">ifRuleOrph</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IsOrphan
</span><a href="GHC.Core.html#IsOrphan"><span class="hs-identifier hs-var">IsOrphan</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-730"></span><span>        </span><span class="annot"><span class="annottext">ifRuleAuto :: Bool
</span><a href="GHC.Iface.Syntax.html#ifRuleAuto"><span class="hs-identifier hs-var">ifRuleAuto</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-731"></span></pre></body></html>